Do countries have to run on deficits? Is their future to behave and act like big companies that produce goods and services?
One of the main reasons for the general tendency to run deficits is political economy. Governments are elected for a limited period and try to stay in power by benefiting their electorate. An alternative explanation is that high debts reduce the scope for the subsequent government. So there are good reasons to impose some restrictions to the deficit into the constitution.
I find the comparison to big companies misplaced. Governments fulfil different purposes than companies. Many of their 'products' are public goods (public infrastructure, education, defense, social security) which cannot be provided by private actors due to external effects. A strictly profit-oriented view of public services therefore falls short of what governments are supposed to do (which does not say there is probably lots scope for efficency-enhancing in most administrations). As a sidenote, running huge deficits is not uncommon to big companies, especially in digital services. As long as creditors are convinced these debts will be paid, companies can be run on losses for quite a while.
Based on modern macroeconomic theory a country does not have to run deficits, but often chooses to. From a Macroeconomic perspective, a country runs a deficit when G is greater than T (Government purchases outweighs Tax revenue). This is not limited to the public sector (Government), but private individuals can also run deficits when consumption outweighs private savings such as in the United States. When a country has both private and public deficits we call these “twin” deficits, such as in countries like the United States.
In theory a country can run a surplus or a deficit, so to answer your question “no a country does not have to run a deficit”. A country can increase savings, reduce investment, and have positive NX (net exports). Of course, the reduction in investment means less consumption in the short-term, which is not politically desirable.
The impact of public and private deficits is theoretically less consumption in the future. This is why economists call running large deficits “borrowing from the future.” At some point, the money borrowed to finance the deficit must be paid back, which will reduce future consumption, raise interest rates, and force more savings. Another impact of deficits is a crowding out effect if the government is running the deficit. This decreases savings, which decreases the pool of savings for private parties to borrow. A surplus on the other hand can lead to an increased pool of savings that can be drawn down upon in the future for consumption.
According to Keynesian theory, if a country does not run a budget deficit of at least 1 percentage point greater than GDP growth, this will cause sunspots to appear, thus causing their economic future to be bleak.
This can be contrasted with private markets where saver/borrower status of non-governmental agents is assured to enable rational optimization without succumbing to animal spirits.