the law of conservation of energy states that energy can not be create nor destroyed, it can only be changed from 1 kind of energy to another kind.
with this in mind, you have to consider where your enery source is( your battery)....everytime you converts that energy into something else, there are inefficiencies associated to every conversion. the battery has internal resistance, the wires have internal resistance, the controller requires power just to operate, the motor is only 80% efficient at converting the energy to motion. each of thes processes produce heat. your battery power is lost due to this heat.
then once the energy is mechanical energy, you have to consider the friction and rolling inefficiencies of your bearings,chain, wheels rolling on a less than smooth surface, even wind resistance.
Bottom line, by the time your generator has produced electricity for your battery, it is only a fraction of the electricity required to move your bike forward.
now if you consider that you are pedalling, too. then you are actually getting power from your muscles too. You might wonder if your muscles are capable of compensating for all the losses in your electric system, and it certainly can if you pedal hard enough and fast enough. But, in the real time, the losses from you electric system are greater than what you can provide from your muscles. Eventually, you need to stop the bike and plug it into the wall to recharge the battery.