Batteries, like hydro reservoirs, can be charged from inflexible energy sources when they have surplus output. It really isn’t fair to compare them to energy sources as they can smooth over the inflexible ones.
Again, batteries make sense with inflexible energy production methods. So if you want to use that coal more effectively, get a bunch of batteries or a lake up a hill to pump into.