The main battery provides backup power for critical systems during flight in the extremely unlikely event of a total electrical power failure.(e.g.all six generators unable to provide electrical pwr), it's a certification requirement.
Firstly, there are TWO main batteries; one at the front, one at the rear.
I'm guessing (or I have read it somewhere) that the one at the front backs-up the cockpit critical systems.
The one at the rear primarily starts up the APU. It probably also covers some critical systems. But it seems sensible if there is also a connection between the two batteries.
Except DC voltage doesn't travel too well, and low DC voltages fare even worse. (just ask Thomas Edison). There are tricks to get around this problem; I don't know if they have them on-board a 787.
As for "six generators"; that is another bit of publicity speak. It's technically correct, but two of them are on each engine, and two driven by the APU. So it's three pairs.
If you have a double-engine failure, you have lost four generators.
You then need a fully functioning battery to start the APU, in order that the other two generators can re-charge the battery. This is a bit of a Catch-22.
It's at this point you are suddenly 100% relying on the RAT (Ram Air Turbine)
And that is exactly why we have these back-up systems.
There are two things that happen when you get old.
1. You start to lose your memory.
2. What was I saying again?