If I buy a 1 year bond for $10,000 paying (optimistically) 5%. Then after one year the interest rates drop to 1% and stay that way for 9 more years, I earn 5% for 1 year and 1% for 9 more years. And over the 10 years I make $1400.
If I buy a 10 year bond that pays %4 a year I make $4000 over the 10 years.
Long term bonds are a hedge against the interest rates dropping substantially for a sustained period as you are guaranteed the interest rate you have now for the full length of the bond (this is all assuming not callable bonds, callable bonds are a different beast).
Note the dividends paid by the bond will not always be possible to invest at the higher rates, only the original investment. However bonds are fundamentally an income rather than an accumulative security so I presume that the investor wants them as cash for expenses etc.
There are cumulative bonds which reinvest the interest in more bonds and pay it all at the maturity date, this would allow locking of compound interest too.