Because there is energy loss in every process - the lost energy is found as heat.
The people answering above seem all to be English graduates or economic historians who cant add.
The motor will require energy E and this will come out of the rotor as torque or turning energy T.
It doesnt matter wh units (always use MKS)
T is less than E. always. T could be equal to E but this only occurs in a reversible process and this isnt one.
T is used to turn a generator and will generate electrical energy Z
This generator is not a reversible process, and so z must be less than T, and the difference will heat the generator up.
and that's why you cant do it -because you always lose a bit of energy as heat. In fact in this it is quite a lot.
unless you add in energy (wind more electric or muclear etc see above)
and the amount of energy you have to add in would be the energy represented by the heating effect in the motor and generator. actually it is just a little bit more, as the addition in this way is not a reversible process.
This question is meant to introduce you to the principles of heat and its conversion to energy and is called thermodynamics. This discussion by the way leads almost directly to the second law.