Your own example undermines your point. Solyndra, a company, was part of a much larger Energy Department program that was profitable for the US government. Tesla itself was kept afloat by loans from this program [0]. This has all been well-reported, you can read up on it. [1]
[0] https://www.theverge.com/2013/5/22/4356860/tesla-repays-465-...
[1] https://www.npr.org/2014/11/13/363572151/after-solyndra-loss...