Typically the people lending money to a company and people who own the shares as a long term investment have very different interests. What is good for the lender is sometimes very different to what the share investor wants to see. It can sometimes be a bad idea if these 2 perspectives get confused.
In many countries, there are strict laws that prohibit a bank from both providing large loans and also owning a significant proportion of the shares of a company. The aim is to try to prevent a conflict of interest.