During a recession, demand plummets. As such, corporate income decreases. As such, they either need to lay people off or decrease their wages in order to stay in business. For various reasons, businesses generally choose to lay people off and maintain wages at pre-crash rates. This means that the business survives, but unemployment rises across the nation.
The government, on the other hand, is far more concerned with macro-economic theory than a business is. As such, they prefer to cut wages rather than people. And as part of their interest in macro-economic health, they also have to solve the problem of unemployment in the rest of the country. Demand has dropped, but as the companies laid off more people, that just meant that demand dropped even further. And since expected wages have stayed the same instead of dropping with income, the companies have no money to hire people.
Keynes’ solution is, effectively, that the government step in and provide demand to the companies. That is to say, the government goes out and gives free money directly to business, to consumers, or simply doesn’t take money away from consumers. The idea is to make businesses appear healthy for long enough that everyone forgets all about the market crash, go back to business as usual, and start hiring again.
Giving out free money or not taking in necessary revenues (via taxation) both mean that the government racks up a debt. Of course, this means that as soon as the recession starts to recede, the government has to jack up taxes, cause a second panic, and effectively destroy everything they had just accomplished (Keynes sort of glossed over that part).
Of course, if they can reduce their own spending, then they can divert more tax money towards debt, which is effectively the same as raising taxes. But it does, as you’ve noted, mean that government employees are bearing the brunt of paying off the national debt, instead of the entire populace. I would imagine that the idea is that no one is particularly worried about poorer teachers. A poorer teacher keeps driving the same old car for a few more years than he had intended. A poorer rich man doesn’t employ new workers. So if your goal is to prevent market panic, you might well choose to tax the teachers. The market cares more about employment rates than how snazzy their teachers look.
If you’re going to target your “tax” on a certain segment of the economy, a fiscally dull one that is not going to go broke isn’t a particularly bad option.
And no, none of this makes any sort of mathematical sense. Macroeconomics is all about human psychology. The market shouldn’t have crashed to begin with (in terms of real numbers, the housing crisis simply wasn’t a significant dollar amount), and giving everyone free money shouldn’t have anything to do with making the market stable again. Ultimately, everything gets fixed when everyone forgets that there was a problem to begin with. Positive announcements like “Government spending reduced!” help with that better than negative ones like “Taxes to rise!”