It’s true they’re at worst 100% efficient, but they’re also typically sized lower than resistive electric heaters in terms of input power. In the US, a residential heat pump likely draws about 4kW, whereas resistive heat strips or baseboard heating could be multiples of that. As an air source heat pump’s output drops on very cold days, a unit rated for e.g. 48000BTU/hr at 47°f might produce only half of that at 5°f/-15c. A “good” unit here would produce perhaps 75%. The way we do HVAC sizing, unless you radically oversized the system for most weather (including air conditioning) you’ll need a backup source of heat on the coldest days.
Code (law specifying how much heating / cooling capacity is required in normal worst-case weather conditions) where I live would require me to use about 2x the normal sizing to achieve pure heat pump heating at the required design temperature (around 5f/-15c). That means at the peak of summer (about 100f/38c) the unit would be operating at less than half of its full cooling capacity.
Apologies for weird units; I live in MAGAland.