there are plenty of non-profit, non-governmental scientific efforts. SETI (yes, it piggybacked on some government instruments) is the best well-known one. Peter Mitchell came up with the pure "basic-science" chemiosmotic theory, founded a nonprofit research institute (Glyn Research Ltd
http://en.wikipedia.org/wiki/Peter_D._Mitchell) to prove and validate it. He subsequently won the nobel prize for his efforts.
HHMI also does this at its in-house Janelia Farms campus.
Not basic science, but Salk and Sabin developed the polio vaccines without much federal help (via march of dimes, a nonprofit) - and didn't even patent their vaccines.
Much basic science in the pre-1940 era was funded internally by the research institutes they were at.
And there are basic science foundations that get the patronage of industry, just because, they're so gosh derned nice, and some that do limited basic science on the side while doing applied that passes patents onto the for-profit (lucent/bell labs, Xerox PARC).