All transformers, and a charger has one of those, have a continuous wire that connects the two input lines from the utility.
Whenever you complete a circuit you allow current to flow through that circuit, and allowing current to flow is what we call using electric power.
When we are actually charging a battery, we allow even more current to flow. Why? because we reduce the magnetic inductance in the transformer. That means we reduce the effective resistance to flow of electrons, so more flow. As the battery approaches full charge, the amount of current allowed through the transformer declines so that at full charge, we are drawing almost the same charge as when the battery is not there, But it is never quite as low a current. The battery itself will leak some power and stay warm.
Where does energy go when we just let it flow through the circuit? Well, the electrons go back to the power station where they cause the generator to work harder to maintain rotational speed. In effect the energy is lost back at the generator.