Think of it as a feed-in tariff. If you successfully purchase, install and connect a solar panel, and the panel feeds power into the grid, you're paid. If not, because you screw up any of these steps, you don't get paid. If you make a substandard installation (say, in the shadow or on a north-facing roof), you get paid less. The only thing that matters is the desired end goal: solar power is fed into the grid. You carry the risk, you get paid for the result.
The idea is that (at least in these cases) it's much, much easier to describe and document a desired outcome than to accurately describe and anticipate all the variables that potentially affects the outcome.
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.
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.