They couldn't really sell fab time to other companies cuz they didn't have a good attempt at fabbing for 3rd parties. So they were only fabricating intel chips, that's not nearly as big of a business as TSMC. So basically, TSMC can keep their last 3+ gens of fabs open and making product, while intel couldn't really reap any benefit from keeping old process nodes open.
AMD made a good call selling off global foundries when it was apparent they couldnt keep up with Intel even.
I think the really rough issue here is what happens if China does try to take Taiwan (and this is not unrealistic as China has been more aggressive towards them recently).
TSMC is now a strategic asset for the USA. We've been attempting to get them to build a fab in the states for exactly this reason.