NSF is not a legislative body. So what exactly can they do ? The congress ain't doing squat. Even the UC system that tried some hard ball negotiation ultimately failed and gave in to most of Elsevier's demands.
"With an annual budget of about $8.3 billion (fiscal year 2020), the NSF funds approximately 25% of all federally supported basic research conducted by the United States' colleges and universities.[4] In some fields, such as mathematics, computer science, economics, and the social sciences, the NSF is the major source of federal backing." - Wikipedia
Let's say that the NSF, during a typical fiscal year, received requests for research funding which totaled far more dollars than the NSF actually had available to grant. And that the NSF had a long-established system of paperwork, procedures, and preferences - to decide which researchers would receive how much from the NSF's limited funds.
Now, if the NSF's preferences were inclined against supporting closed-access publication of research results, and if some universities were not so flush with research funding from other sources that they could happily maintain a "principled stance" and ignore the NSF's crass, self-serving bias...