Even small generators provide a lot of power at once, for a small initial price, but are expensive to run continuously. A battery has low operating cost, but one large enough to run a house off of solar power, year round, is extremely expensive. A battery that is large enough to work 99% of the time is much cheaper, and a generator can fill in that 1%, operating only a few hours a year, at a very low cost.
Even small generators provide a lot of power at once, for a small initial price, but are expensive to run continuously. A battery has low operating cost, but one large enough to run a house off of solar power, year round, is extremely expensive. A battery that is large enough to work 99% of the time is much cheaper, and a generator can fill in that 1%, operating only a few hours a year, at a very low cost.