Flywheels are useful because they store a lot of energy and don't require a lot of energy to keep them spinning (i.e. topped up with energy). Simply connecting them to a generator can be done (relatively) quickly and allows them to supply power for a relatively long period of time. It's basically a mechanical battery.
Both have the advantage that they are cheaper to operate than a typical peaker plant, which is increasingly the role of remaining coal plants that are otherwise too expensive by orders of magnitudes to operate continuously. Switching those on is a last resort for energy companies. The more battery they have, the less need they have for those. And the less they get utilized, the more expensive they are to keep around. Gas plants are better but they take a long time to turn off and on again and doing that is also not cheap.
Prices have actually turned negative a couple of times in e.g. the UK in cases where the power companies were literally paying people to use their excess power just so they could avoid having to turn off plants that are expensive to turn back on. Basically, grid storage capacity allows electricity companies to smooth out peaks in demand and supply and respond extremely rapidly by either soaking up or supplying many GW.