Alice is a professor at Harvard. She wants to research some topic. She applies to the NSF for a grant. The NSF says "wow that research sounds awesome and aligned with our priorities" and funds her lab to perform that research. She and the lab perform the research and share it with the scientific community for free.
That's what federal funding for universities looks like.
> She and the lab perform the research and share it with the scientific community for free.
I remember that people advocated quite hard a few years ago to make that last part mandatory, because at the time it wasn't. Universities can claim ownership and patent the discovery. The research was also usually locked behind for-profit publications, thus limiting the research to only those that can afford to pay.
The initiative that I remember asked that government funded research must be published in open access, and that no patents (or other IP) may be created in direct relation to such research.
Did such initiative win and become law?
The journals are often behind paywalls, though more and more research is published open access.
Regardless, researchers share their research with other researchers for free and a huge amount of paywalled papers are actually just available for free on the authors' websites.