I worked for a brokerage house in their bank for a short time and oversaw some underwriting on loans like these on the legal end. This was 20 years ago. So this is nothing new and very common.
The banks will loan up to 80% of value typically with 50% being most common, and charge interest. So they do need to be paid back over time. But they were loans on portfolios so it was a better deal to pay interest on the loan than to pay capital gains taxes on selling the assets.
THe trade off is that the money stayed in the markets helping those companies they had holdings in and propping up markets.