Code can be patched, but human behavior is difficult to correct. People are often careless because they don't risk their own money, but are simply doing hired work, often irresponsibly.
I often blame big organizations for only relying on the work done by hired devs. I find it distasteful that there's no reliability tests on those codes before they're merged. There should be teams that check the code for loopholes before the patch can be deemed fit to be integrated into the main codebase. These platforms are dealing with lots of money, they should be able to have quality in-house white hats who are very experienced to point out flaws in codes. Every platform needs to run a total AI assisted security check on their codebases, we never can tell who these hackers are targeting next.
Binance exchange have teams that looks out for attacks and loopholes every now and then, but in the end they got hacked massively and right now after the Binance exchange hack few centralised banks have been hacked too.
It's not about having reliable team anymore, one step ahead is enough to get any platfrom hacked, it's not all loopholes that can be detected immediately, sometimes hackers only need few minutes to get things done and if your loophole is supposed to fixed in one hour it's late.