Saying that batteries and generators do the same thing, is a false assumption. Batteries store electricity that generators produce.There are several different kinds of generators nowadays, including wind turbines and solar panels.

A Perfect Partnership Between Batteries and Generators
A generator produces electricity ‘just in time’, because it cannot store it. Batteries cannot generate electricity, but they can deliver it exactly when we need it.
A Water Pump And a Water Tank Do Something Similar
Let’s think of a water tank and a water pump. The water pump delivers fresh water to the tank which stores it until we need it. The pump could keep the water flowing for as long as it is running.
Another Analogy: Batteries Storing Electricity For Later
Let’s compare batteries that store electricity to another energy source. We can see the difference clearly in a conventional vehicle. The battery provides electricity to start the engine.
Once the engine is running, the alternator becomes a generator, supplying electricity to the lights, radio and other electrical equipment while also recharging the battery.
Power Stations Produce Electricity They Cannot Store
Power stations work in much the same way, except they do not have batteries to store electricity, because they are only generators. They simply make electricity continuously using steam, flowing water, wind or other energy sources.
Since electricity is difficult to store in large quantities, we usually generate it when we need it. This is the reason why power stations operate day and night.
Generators And Batteries Are Partners Not Competitors
Batteries are important whenever we need portable electricity, or no power lines are available. They allow us to use our electrical devices almost anywhere, anytime.
In our next article we discover how batteries store electrical energy, using surprisingly simple chemical reactions.
More Information From Our Battery Blog