The longer your money is invested the more interest you'll earn. Your same $10,000 at 5% for 30 years turns into $43,219.42 Same money, same interest for 40 years is $70,399.89

The higher your interest rate, the more interest you'll earn. Your same $10,000 at 10% for 20 years will become $67,275.00

Combine longer time and higher interest and it starts to get really fun:
$10,000 at 10% for 30 years = $174,494.02
$10,000 at 10% for 40 years = $452,592.56

$10,000 at 12% for 20 years = $96,462.93
$10,000 at 12% for 30 years = $299,599.22
$10,000 at 12% for 40 years = $930,509.70 (yep, nearly a million $)

Imagine if you could scrape together only $10,000 by age 20 and find a good mutual fund that paid 12% interest (not that difficult really) and just LEFT YOUR MONEY THERE until you were 65 years old, you would have $1,639,876.04 That's without you ever adding one more cent of principal to this investment. The sooner you can get investing in something earning a decent interest rate, the better off you will be at retirement.

P.S. Your mortgage (or car payment, student loan, credit card bill. . .) works on a compound interest formula in your lender's favor. That is why you often end up paying 3 times the cost of your house by the time your loan is completed.