I'm not as familiar with how mortgage markets work in other countries, but at least in the US fixed rate mortgages are almost always risk balanced against fixed rate investmentsor wrapped up in securities that move risk off the banks' books.
A bank would indeed be crazy to hold onto fixed rate 30-year loans with interest rates at near zero.
Yeah, in the US fixed rate mortgages are handed off to the government who guarantees them and bundles them up into securities... that SVB then ended up buying a bunch of because it's not like there was exactly a wide variety of investment options available that they could back their deposits with that actually paid meaningful interest.
At least based on this article, it even sounds like this is what they wanted banks to do! The reverse-repo market was created because the Fed wanted banks to buy securities directly from them when interest rates where increased, sounds like SVB and others just followed that playbook
A bank would indeed be crazy to hold onto fixed rate 30-year loans with interest rates at near zero.