I forget the technicalities but something to do with pulling energy, hot and cold, out the air from the atmosphere. Probably put that badly, I used to be all over this and had a real interest in AC but I have forgotten more than I remember now. It's something to do with the phase change of taking a liquid to a gas and vice versa but as I used to say, it is the one actual instance I know of what some would call over unity.
You get more heating or cooling energy than what you put in electrically because the other energy comes from the atmosphere on the condenser ( outdoor) side. Pretty sure that the real efficient units are up around 4:1 now.
You have to remember one is electrical energy and one is thermal energy and there is a conversion taking place in between. Best you look it up for a better explanation and understanding that what I am giving you.
The takeaway is that no, this is not wrong, it's the advantage of heat pumps is their great efficiency over the nearest comparison of resistance heating both in spce heating and the newer heat pump water heating.