You can do that, there are custom roms and open source phones. The problem is banks are legally obligated a lot of the time to pay out for fraud and scams. So in response they won't allow you to run their software unless they can verify the compute environment.
So why can I access my bank account just fine via the website on my phone, but shouldn't be able to do the same via the app? Can't they offer at least a PWA version of the website for custom ROM users?