Not entirely accurate. Exactly one bank (a small Asian American community bank, the 2651st largest in the U.S.) was prosecuted after the subprime mortgage crisis.
The secret is to have everyone in on it. Everyone is guilty but nobody is quite culpable enough to punish.
The low level guys were just doing their jobs, and each individual transaction was mostly legal. A few weren't but it's hard to sort out which ones. Maybe the management should be responsible for ensuring that nobody ever did anything illegal, but they can't really supervise everything all the time, can they?
Poof. Guilt is just a rounding error that all rounds down to zero. The government passes some new regulations to prevent that particular scenario from happening again, and the same people set about finding a new scam.
This kind of still works for things that aren't real like money or law because they are societal constructs, but for the cases involving the real world, there's no escape from consequences (only dumping them onto someone else to deal with).
It's also the thing for bigTech to do as well. They break all of the societal norms to make the world they want, then "work" with regulators to make it okay for them to exist yet make it extremely difficult for anyone to follow as they will have to deal with the regulations.
Once you get to the top, the act of pulling up the ladders behind you is "just" self preservation.