The problem comes in when you factor in the danger of ever changing political and project climates. In this case if the Republican party had been successful in revoking the ACA whatever work the contractors were doing was now completely wasted through no cause or fault of their own.
In your analogy it would be like you're successfully installing the panel and suddenly there's a massive tree completely shading the solar panels or the power company suddenly refusing to accept feed-in power from residential structures.
That's a risk of doing business. AirBnB and Uber are running similar risks against the political system (probably worse - they don't have ~half of the political system in their corner). Every other business is always risking that nobody will buy their product. Having any kind of promise of a guaranteed sale is a pretty luxurious position for any business.
If the risk is large enough that nobody takes it, then the procurement office can look at sweetening the deal (perhaps by increasing the payment per transaction, perhaps by offering some compensation for good faith effort if the legislation is revoked).
There is enormous overhead in bidding on and winning a government project. They're the reason the "37signals" of the world isn't doing them even even though they could probably execute much better on them.
If a client came to us and said "hey, we have a project for you. You just have to build it and we can split whatever profit you make off of it", you can guess where we'd tell them to go. It's very different from basic business risk.
In your analogy it would be like you're successfully installing the panel and suddenly there's a massive tree completely shading the solar panels or the power company suddenly refusing to accept feed-in power from residential structures.