Nothing is 100% efficient. And I think your answer is "both". The processes of converting voltages and controlling currents make the charger drop its efficiency and heat up. The heating is the product of power losses, which are I2R losses. That means the losses due to the resistance of the elements. Even a short wire has a resistance.
However, most of the drop is in the power converter. Check out power supply efficiency using Google.
In an example, let's calculate the power loss in a MOSFET. Let's pick a random MOSFET; IRF540PBF-ND. The properties of this MOSFET are:
Rds On (Max) @ Id, Vgs : 77 mOhm @ 17A, 10V
That means if you put 17A through this MOSFET, it will act as a resistor (well, at least to simplify) of a value of 77mOhm. That is 0.077 ohms! It may seem low, but let's calculate.
Power loss in this MOSFET is approximately: I2R= 17.17.0.077 = 22.253 Watts! That means a lot of heat!
Here is a 25W aquarium heater!