There are a few industry options for the sciences but less so for the humanities, where tenure is intended to protect scholars who investigate and question things that the wealthy and powerful might find dangerous to their interests (e.g. Marxism).
Also, it sounds like you are talking about (software) engineering, rather than basic science (e.g., astronomy). There are plenty of questions humanity would like for science to answer for which there is no financial incentive to a corporation.
Again I just can't relate any of that to what I know at all!
When I finished my PhD I moved into industry and basically kept working on the same project. I work for a megacorp, and almost everything I do is developed fully in the open (public GitHub repo, not a mirror), we publish several times a year at the same venues I did in academia, and everyone is free to benefit from what I work on from using the code, reading the code, reading the papers etc.
And this isn't unusual. I know many many people in the academic community who do almost exactly the same thing. Look at everyone in Microsoft Research, Oracle Labs, IBM TJ Watson, etc.