TSMC has a market cap of 0.9T USD. It would be the 7 largest US company by market cap if it were one. Manufacturing chips is extremely profitable, at least in the current climate. It used to be that software is more profitable than hardware, which is more commoditized, but AI gave hardware companies a renaissance of sorts.
It's not a simple process at all but requires a lot of engineering and engineers to do it.
It only became profitable NOW in the last 2-3 years.
Before that, foundry after foundry was shutting down or merging.
TSMC, UMC, Samsung, Intel Foundry Services, and GloFlo are the last men standing after the severe contraction in the foundry model in the 2000s-2010s due to it's extremely high upfront costs and lack of moat to prevent commodification.