When you take out a loan, you are now obligated to pay the money back with interest at some time in the future. Some part of your future efforts are no longer yours to do with as you choose, but have to be directed towards an economically productive activity that will raise the money to pay the lender.
Debt is the real whip that drives the workforce in the capitalist system based on hourly and salaried compensation. Ownership of slaves and physical whips are no longer needed. The debt and employee system is more efficient, since workers can be laid off and not supported when not needed.
Debt is also older than money. https://en.wikipedia.org/wiki/Debt:_The_First_5000_Years