Imagine you run a small regional bank. You have marketing and operational expenses you need to cover, and you also need to be attractive enough to depositors to keep them from leaving to your giant to big to fail competitors who have explicit state backing. You’re required to buy from a very limited selection of assets that have government approval, especially government debt.
Interest rates for short term debt are at 0%, at these rates you will run at a loss. Your only choice to keep your bank competitive is to find any yield at all, so you buy long duration treasuries. Yes you take interest rate risk, but your bank is able to operate for another day.
Of course the flaw in this story is that the interest rate risk should have been hedged, and it wasn’t. But viewing this as a straightforward story of “banks greedy, government good” is not reflecting the realities for regional banks.