Why can't countries immediately stop the deficit?
Some countries have very strict fiscal rules that basically force them to keep on spending more, or reduce the government's ability to cut spending (Brazil is a good example). Other countries have looser rules, but can't cut because of political pressures.

Remember acute spending cuts mean less money for hospitals, schools and many other services that rely on public money. It's often a very impopular measure.

That's why economists often favor clear, well-defined spending rules. Such as establishing a primary surplus target during times of economic growth, a maximum deficit during recessions and maybe a debt/GDP ratio ceiling.