The rate on our loan is something like 1.6% (shortly after it was literally 0%). If I can find an investment for more than 1.6%, I'm technically coming out better. Loan fees make the math fuzzier, but I'm simply demonstrating for this conversation.
For example, if I can make 4% on an investment and a loan is 1.6%, that means I can still make 2.4% net interest if take the loan and use the cash to invest.
The math gets even more favorable when you consider inflation. $1 in 5 years is actually cheaper to me than $1 right now.