I actually think of it the opposite way: if you put money into paying down debt, you know
exactly what the return on that capital will be. It's the interest rate on the debt (in pre-tax dollars for mortgages, after-tax for almost every other form of debt). Money is fungible; any money that's not locked up in debt-service is freed up for other purposes, like investing in other assets.
I tend to advise people I know to pay down debt first these days, because they're usually paying around 6-7% interest, and where else can you get a 6-7% risk free investment? T-bills are at about 3%, inflation-adjusted T-bills are often less, CDs are under half a percent, and savings accounts are basically nothing. You can potentially get more than that in the stock market, but that comes with additional risk, so for a lot of more conservative folks it doesn't make sense to carry a debt and simultaneously invest in the market.