There is no generation of energy here, its just conversion from one form to another. :)
SG coaches contain alternators connected to the axles of the coaches. The axle is connected to the rotor of the alternator, so that when the axle rotates, the rotor also rotates and the alternator generates electricity. In other words, the alternator is converting the kinetic energy of the coach into electric energy. The coach's kinetic energy is provided by the locomotive, as the faster the locomotive moves, the more the kinetic energy of the coach.
...
more... For example, if a normal rake requires 3000kW of power to keep running at 110kmph, and if the alternator has to generate 25kW to power all the internals of the coach, then the locomotive has to supply this 25kW load also per coach. So, for a 10 coach rake, this means that 250kW is used up just to provide enough speed to keep the alternators running at their capacity. The remaining amount will be used for accelerating/moving the train. That's why, if this equipment is removed, then it will free up the locomotive to carry longer trains, or carry the same train at a higher speed.
This is just one way of explaining this.