When spending on public services such as health and education exceeds revenue (mostly taxes), governments borrow to cover the shortfall.
Large-scale projects such as railways and power plants have high upfront costs but generate long-term economic growth. Borrowing spreads these costs over many years.
During recessions or unexpected events such as pandemics or natural disasters, tax revenues may decline. Governments borrow to increase spending and stabilize the economy.
Governments may borrow to manage temporary revenue shortfalls during the fiscal year, as well as to refinance or prefinance existing debt obligations.