So the rejected energy in this sankey diagram is partly just the consequence of the thermodynamic efficiency limits of the situations. Also, since there are always heat and resistance losses (the real world is not a frictionless surface), the efficiency of converting energy into work is further decreased.
All in all, we're actually pretty good at covering heat into energy. The rejected energy here is simply a consequence of the situation and thermodynamics. For other situations that don't involve heat-to-work, such as wind and photovoltaics, the Carnot cycle doesn't apply, and you can have much less rejected energy.