It isn't just about prioritizing the latter. For india, Money spent on improving the economy or alleviating poverty goes a lot farther than spending on carbon neutral energy.
For a rich western nation like germany? Not a lot of low hanging opportunities so might as well spend on green energy.