Loans don't last forever; they just feel like they do.
When companies and governments issue bonds, they attach a maturity date to them. The maturity date can range from a few years to a really long time (Disney has 100 year bonds, in case you're planning on freezing your head). In a lot of cases, bonds are linked to the expiration of a loan or how long a company expects to take to repay a debt.
Bonds that are issued for long periods of time will have much more volatile prices than bonds with shorter durations. Why? Well, over many years, a lot can change in a company, which can make the prices of bonds change. On top of that, inflation and other market concerns can change the price of bonds over a longer period.
For companies, long duration bonds can make sense. Having decades to pay off the bills is a nice luxury, especially if the company grows. Being able to pay off $10 million in bonds when a company is young can be bruising. But paying that same $10 million when the company has ballooned into a multi-billion dollar and multi-national enterprise? Puh-lease. That's someone's tie clip budget.