I can't name a specific example off the top of my head, so I'll provide a circumstance. A country with a free market hits a cyclical recession. Recessions are bound to happen at some point in any major economy. Suppose this country has no debt or some that is definitely easy to pay off. It hits its recession for whatever reason. The government can spend money to stimulate the economy by means of infrastructure or something like that. It doesn't necessarily have to raise taxes but that is an option. The whole idea with that process is that it is done responsibly, as in when the cyclical recession becomes growth that is when you reduce your spending and taxes to pre-recession levels. Taking on debt isn't always a bad thing, as long as it is handled responsibly. The debt incurred during the recession should be able to be paid off from the growth. Thing is, it won't work in the American economy because for one they aren't responsible and two raising taxes is still a bad idea at this point.
What you are suggesting is Keynesianism or stated another way Centralized Planning and it doesn't work in practice. The theory is that government can step in and smooth economic cycles by spending in bad times and taxing in good times. The problem is that it delays the volatility rather than extinguishing it. Thongs can go along relatively smoothly for a long period but eventually there needs to be a creative destruction period. What Keynsianism does is delay and heighten those periods of destruction.
We almost entered one in 2008 but it was forestalled by massive amounts of money printing. The borrowing of governments also sees no bounds so the spend in recession/tax in boom cycle becomes spend in recession/spend in boom and debts grow and become unmanageable. We are now near the end of a debt super cycle. That debt, the result of Keynesian economic policies run amok, will be extinguished one way or another. many people believe that t will implode in a depressionary slump but I believe that our dear leaders will follow the path of all former madmen and print money until the currency explodes to inflate their way out of debt.
Printing gives the bureaucrats cover. They will do exactly what all other money printers have done and this is blame all sorts of imaginary boogeymen such as hoarders, profiteers and all sorts of bull crap because people cannot figure out why prices will sky rocket and why their standards of living have collapsed. It is too hard to connect the dots between borrowing all of your future prosperity for consumption today with poverty, starvation and being destitute in the future. I mean who knew borrowing and livng on a credit card at a national level would lead to peonism? (look it up).