Illustration: country A and B both see an upcoming demographic crisis and decide to get ahead of it.
Country A ensures they don't run deficits and pay off their debts to prepare.
Country B prepares by incurring a debt to build hospitals and train nurses.
20 years later the demographic crisis hits. Country A cannot build hospitals and train nurses fast enough to meet the need so the price of both skyrocket and the piles of money they "saved" is inflating away to almost nothing.
Meanwhile country B is fine.