Modern ACs can be used to heat - they "pump" thermal energy from the cold outside to the warm inside (against the thermal gradient). For 1W of consumed electrical power they deliver 5W (for example) of total heating power to the room.
On the other hand, resistive heaters deliver 1W of heat for 1W of consumed electrical power.
This is the difference between "waste heat" (e.g. resistive heating) and heat pumps.