Generators are a very cost effective solution for backup power, and many off-grid homes will have one as they supply their own grid and that sometimes needs supplemental energy support.
But generators are not always a suitable solution, for instance in urban areas where noise pollution is an issue. And some people are less comfortable using a generator (refuelling, basic maintenance, even starting it if not automated).
I set up a generator backup system which worked great but my wife was not at all comfortable using it. If I was not at home when the grid went down, she would not use it. This became more pointed when we built a home for my elderly mother on our land and I did not want her to be without power just because I wasn't there.
So I wanted a backup system my wife was good with and could easily operate if I was not here. The off-grid solar PV & battery system means she only needs to flip one switch and that's it. No need to pull a generator out, start it, or refuel it. It operates silently and doesn't require refuelling. The system can also be put into Utility pass through mode to automate the cut over to backup if we feel that is desirable at times (I normally don't use that mode as it limits the power we can draw).
Of course if an outage is very long and the weather poor for solar PV production to keep the batteries sufficiently charged, then I still have the option of providing supplemental energy to the system with my generator.
This is actually a really efficient use of the generator as two hours of generator operation will supply about eight hours of backup energy into the battery. Else if we were using a generator alone it would need to be running for those eight hours.