The subsidies make the plant break even. Defense spending is basically another subsidy. Most of the weapons the US makes is useless in a civilization that has mostly been at peace for a long time. Hard to say how far defense will go though in terms of spending.
You are definitive about defense spending in a recession. This is wrong. Aspects of the government will begin pulling back. We do not know how this will effect tsmc.
This move from a profitablity standpoint is break even as far as we know. It makes no economic sense.
Btw. This isn't something I'm making up. The CEO of tsmc mark liu stated this to Nancy pelosi during her visit. Also her husband is dumping tsmc stocks for unknown reasons.