I think there are two differnent questions here:
What is too big to fail? These are companies where, if they were to fail, would cause catastrophic problems in the national or global economy. Despite what some may say, it's very rare that the government intervenes in any private company's collapse--it really only happened in the 2008 recession because everyone was more or less hit by the same thing (subprime mortgages).
The policies involved rarely mean just cutting a check to the company--that reinforces the "moral hazard" (encourages companies to make risky choices because they know the government will bail them out). It's usually a combination of loans (usually pretty safe for both parties), restrictions, sell-offs, or other regulations to nudge a company into health. These are almost never used if the failure is due to the company's performance--it's only done when there's a systemic issue in the industry overall.
(There's nothing inherent in the government doing whatever they want--they could hand out cash to whatever companies they want. But so far we haven't seen that because it's incredibly unpopular.)
How can a company lose money month after month and still exist? Large companies have lots of flexibility, and it takes more than a few months to cause them to collapse. During recession it's not uncommon for companies to lose money every quarter for several quarters. Sometimes it's cash on hand; sometimes it's stock; but often they're just able to borrow money using the company as collateral. They usually have plenty of time to right the ship.
It's relatively rare that a large company would completely collapse--if nothing else, they'll get bought out long before that happens. But not always.