'Money' is a credible, transferable, legally enforceable promise to deliver something of value to the bearer at a later date. The goods/services promised are what 'backs' the currency, and the value of the money is determined primarily by the supply of and demand for of the promised goods/services, and the credibility of the promise.
Currencies backed by a specific good/service - whether that's gold, cigarettes (e.g. in prison), food, digital currencies, or whatever - are vulnerable to instability, as the supply/demand for a single good is usually much more variable than the economy as a whole, and it tends to trigger wild swings and bubbles that distort the efficient running of the economy. It makes long-term planning and money as a store of value more difficult. So more controllable goods/services are widely preferred.
Government money is generally formally backed by the promise to accept the currency in payment of taxes - as the old saying goes, the only certainties in life are death and taxes, so this is a 'good' that every taxpayer needs and it never goes out of fashion. The value of money is then determined initially by the effort and resources needed to supply the goods/services provided by government, and the credibility of the government's promise to deliver it. If the government credibly promises to deliver more (e.g. by improved efficiency), but keeps the taxes the same or lower, the value of money goes up. If the government delivers less, but keeps taxes the same, or if it delivers the same while raising taxes, the value of money goes down. If the government tries to extract more effort from the economy than the economy can support, it cannot deliver on its promises and the currency value spirals out of control.
However, most of the money in government-backed currencies is not created by the government. It is instead created by ordinary people borrowing money from lenders. When you go to a bank and sign a loan agreement promising to pay the loan back on a specified schedule, that constitutes a promise to repay. By signing the contract, you turn a worthless piece of paper into a valuable but illiquid asset. The bank exchanges this for more liquid forms of money, and puts the signed contract in its vault. ('Liquidity' is about how fast you can turn the promise into something you can actually use. A contract to repay in 20 years time takes 20 years to recover the value. A voucher you can exchange for a burger today needs only as long as it takes you to walk to the store. Savers replace liquid cash by illiquid investments, borrowers replace illiquid loan agreements with liquid cash.)
While the government promise to accept the official currency in payment of taxes provides a stabilising background, the value of money is now also driven by the supply of and demand for loan agreements. Supply is limited by the people wanting to take out loans, and credibly able to repay them, demand is limited by the availability of savers with liquid assets that they want to invest for the long term. So the value of money is now determined by the economy's need to invest value in long-term promises. A more complex supply chain organisation can gain efficiency by making investments now that maybe will not pay off for years, a more hand-to-mouth existence pays back faster, but less efficiently. The extent to which we can do that is limited by how much liquid capital we can currently spare, and how fast we can use it to reorganise the supply chain along more sophisticated lines.
The economy is a machine for making the stuff we want and need. The more stuff there is to go round, the more prosperous society becomes. If we have capacity to spare beyond our immediate needs, we can invest in building a bigger and more efficient machine, to make even more stuff, and gradually eliminate poverty. The government extracts a proportion of the output of the machine for doing things politicians think need doing, even though the population is either unwilling or unable to pay for it themselves. Public goods, justice, defence, welfare, ... things most voters consider reasonable and necessary. But the human effort to do those things is diverted from the rest of the economy. It means everybody works more to get less; it slows the development of a more productive economy, and thus delays the elimination of poverty. (Politicians may try to put the burden on the richest and most productive, but tax incidence theory tells us that the burden is shifted onto those least able to find an alternative to the trade being taxed, which is usually the poorest. Not that taxing the most productive would help economic productivity, either!) It may well be essential, but it comes at a cost. And if the government tries to take too big a slice, and what's left is not enough to produce what people need to survive, supply cannot meet demand and prices go up, forcing government to raise taxes, forcing prices to go up further.
In summary, promises to repay drop in value when we as a society try to live beyond our means, just as it does for individuals.