I think you are consistently reading HP as just the equipment itself. As myself, Dusty, JTQ, Gumpy, JC and others have indicated it’s the total system installation, which includes the house, that should determine the viability and efficiency of a heat pump installation. I think by now everyone is well aware that as a single piece of equipment a heat pump is more efficient than a gas boiler, your shed analogy explained that. But I venture to suggest that few if any existing houses built before 2000 could just swop a boiler for heat pump without substantial expense and disruption. If they did so, there’s a significant risk that the HP system would fail to meet expectations.
This is exactly why I am pointing out the difference between "efficiency" and "effectiveness" which are so often misused and consequently add to the general confusion, and the perception that "heat pumps" are believed to be only "efficient" when a building has been designed with one in mind thus implying unless the building has been designed with a heat pump in mind using a heat pump as such is inefficient, but how efficient a heat pump is not affected by the type of building!
There can be a cost impact of changing to a heat pump from other types of heating systems, and that depends on what type of system is already installed, if you were installing a whole building heating system from scratch the cost of a wet heat pump solution would would be similar to a fresh install of a gas system, and that would also apply if changing from electric storage heaters, toa wet system.
The issue is that whilst gas heating and heat pump heating looks similar, it is sufficiently different to make changing from gas to heat pump needing extensive changes to maximise effectiveness.
And there may well be some cases where for some practical reason the unique needs of a heat pump installation cannot be met, but the same can be said of any system, it's not unique to heat pumps.
But in general if you have a gas boiler the system and it can be replaced with a heat pump, the cost of replacement is what is causing legitimate concern. But that does not mean the heat pump would be inefficient.