Well, lending is a very important function in an economy. Without lending, you could never invest more capital than you had on hand... If you had a handmade widget that you were producing for $10, and could only sell for $5, but a million-dollar factory would let you produce 100,000 widgets a day for $2 each, lending is the only way to get into business.
It's not the use of debt that's a problem, it's the misuse of debt.
That's not actually how it works. Money is not a thing. Money is a decision and a means of social punishment/reward.
Lending is either an executive function based on (supposed) faith in the future, or it's gambling, or it's client patronage, or it's extortion.
There is no financial business model which does not reduce to these relationships.
In your example, the factory gets built if someone important decides it should be built. They charge 'interest' based on justifications assembled from some combination of gambling, extortion, or patronage.
It's an entirely imaginary and delusional system, and completely faith-based.
It's not the use of debt that's a problem, it's the misuse of debt.