Look at the publicly funded Bell Labs in the 1940's - 1970's
They invented everything from the transister, tcp/ip, C language, satellites, cellphones, and the list goes on ... they were not-for-profit because the government allowed ma bell to be a government sponsored monopoly.
Look at that incredible work done, which would not have occurred if they had been forced to churn a profit each and every quarter.
It is a tragedy what happened to Bell Labs when they finally were cut off from being a non-profit in he mid 1970's. The shell of Bell Labs remains, iirc the buildings are now owned by Nokia, but it is a very sad result for the company that pioneered our modern society.
A great book on Bell Labs is called The Idea Factory, highly recommend that.