Follow the incentives.
Yes, in many countries legislation requires that some form of open access is used. As with FOIA or GDPR or other legislation which requires people disclose information it is not practical to go around arresting and jailing thousands of admin staff every week day for not complying, so you're dependant upon a cultural shift in society.
However, of course the for-profit journals will lobby to have the rules drafted in a way that permits them to continue to exist, even if they must make some sacrifices.
For example, "Green Open Access" versus "Gold Open Access". The latter requires publication in an Open Access journal, but the former just requires that the for-profit journal not unduly prevent the authors from archiving their own papers, perhaps under an embargo and with copyright permanently devoted to the journal publisher.
In practice, the reality before Open Access but after the Internet was available to academics is that you could get a "pre-publication draft" of more or less any paper by contacting the author. Of course, to know you want the paper is difficult if you can't read the journals everybody is publishing in. So Green Open Access satisfies the obvious technical requirement that if I hear about Professor Smith's breakthrough in Vulcan Unicorn Steel I can go read the paper without paying Elsevier a pile of cash, but doesn't really free Vulcan Unicorn Metal research from funding Elsevier. Smith's peers read about it in the Elsevier journal their institutions pay $$$ to receive copies of and that's how I heard it's a breakthrough.
There are much more difficult coordination problems that people are at least making some progress on, like fighting climate change. This is because a lot of people care about not letting the planet overheat, including the powerful. But academics largely don't care if their research is easily accessible to anyone who isn't citing them or on their tenure committee.