If we are talking about the United States and most countries that operate on a Fractional Reserve Banking system then a government unable to accumulate debt would be an economic disaster.
Much like how a bank is able to lend out far more money than it holds in assets able to carry that risk, if everybody takes a run on the bank then the illusion of all that borrowed money in the system is crashed and the economy takes a nose dive. We maintain the illusion of course because of the simple fact that borrowing money now and quickly provides for a fast efficient economy.
Governments are much the same way in that they are also borrowing from central banks by floating bonds. These bonds have an opportunity to mature so that they cannot be paid back immediately. They retain value however as long as people are willing to buy them, and they are valuable even though they may never be really paid back because the government spends a good deal of its annual budget on servicing that debt (paying interest). That interest is generally good to peg to inflation which is why they are considered safe as long as the government as considered safe and legitimate.
So in essence most money introduced the system is through debt, and while it is a house of cards, the alternative would be that government would be slow and ineffective to react, unable to handle national emergencies or wars, and would periodically run the risk of ineffective services due to an extremely volatile income (tax income goes down in a bad economy).
If instead they were to print money every time they ran short then inflation would be highly volatile as well and this would cause the economy to be highly volatile (Eg. see the 19th century US economy for an example).
For matters of national security, and a quick efficient economy the government must be able to introduce money into the system by taking on debt as it does not have a sudden effect on inflation and makes the government more functional.