The power needs to be supplied by the electric motor at the shaft end is more diminished than the power the motor can absorb from the power line, so the motor efficiency will always be less than 100%.
In closed motors, this dissipation is assisted by the fan installed on the motor shaft itself. A practical dissipation may be modified, depending on the strength of the ventilation system of the total dissipation area of the housing, of the temperature difference between the outer surface of the housing and the ambient air. 2100-5M-15 Gates
The main difference between the two powers is the heat losses, which automatically heat the winding and dissolve into the external environment of the engine, with the main function of preventing the increase in temperature from being considered excessive. The same fact can happen in all other types of engines.
In the case of a car engine, the heat generated by the internal losses will be taken from the block through the water circulation system with the radiator or by the fan in the case of air cooled engines. The heat generated by the losses inside an enclosed motor is wasted into the ambient air through the outer surface of the housing.