In some climates it is possible to rely entirely on solar panels and reserve batteries and be completely disconnected from "The Grid" of the national electricity network. However, this is usually not feasible because most of us live in areas prone to cloudy or rainy weather.
Remaining connected to the electric utility's infrastructure has two advantages: (1) It provides a back-up source of power on cloudy, rainy days and (2) in most states you can sell your excess electricity back to the utility as a credit against your next bill.
The main drawback to electric power of any origin has historically been that it's a constant flow that has to be used or lost. That's why electric companies have to manage for their peak usage times because any time the peak demand exceeds the flow there will be outages. Meanwhile, when demand is less, excess power being generated goes to waste. Battery storage, at least until recently, has not been efficient enough to take advantage of the excess.
The same is true of solar houses off the grid. On sunny days, you make more power than you need. To some extent, you can save some of the energy in batteries to be used later, but generally speaking you lose most of the energy being produced that exceeds your need at that moment.
When a solar house is connected to the utility grid, this excess solar energy can be fed backwards to the utility and credited to the homeowner's next bill. The electric meter can actually go backwards.
You'd think that one of the advantages of this combination would be that your house would have solar power to fall back on during utility outage -- while the rest of the neighborhood does not. This isn't necessarily the case because of a safety feature that shuts down your solar-generated electric current during a utility outage. This is done to ensure that utility electricians working on restoring the power are not jolted by the reverse-flow of energy coming back along an otherwise dead line.
To get around this problem, you can have an additional switch installed in your system that makes your system independent of the utility when you need it to be. This, of course, adds to your investment cost.