Similarly, in mild weather, it is more efficient to burn hydrocarbons and turn it into electricity to run a heat pump than use that hydrocarbon for it's heat energy directly.
Pumping heat is more efficient than making it.
Compared to nearly 100% usable energy from normal solar panels.
Furthermore if you have a heatpump you can convert this electric energy into heat energy with a factor of >3 (COP).