Since we are discussing Tesla solar roofs, they suggest your installation comes with a PowerWall, thereby storing power during the day to use at night. I personally don't think we are there yet, but I think the goal is that you don't need the entire national power grid just for night electricity, just a big battery.
Batteries + roof PV, is far more expensive on a per-watt basis, then a power grid + utility-scale generation.
"Just buy a $15,000 PowerWall, which you will need to replace every 10 years" is, compared to grid electricity, incredibly wasteful.
There's a reason why customers and users overwhelmingly prefer centralization, even if its harmful for them in the long-term. It's cheaper, and people would prefer it to be someone elses' problem.
Have you done the math? If net metering didn't exist, my back-of-the-envelope calculations say it would probably break even in California. With net metering, sure, it's pointless.
My parents pay $1,200/year for electricity, in a fairly large house. Given the expected lifetime of a power wall, that will eat all the 'savings' of living off the grid.
There's also the matter that if, say, 40% of the population disconnects itself from the grid, that doesn't mean that the cost of maintaining that infrastructure will drop by 60%. Someone will have to pay for it.
Where are you getting $15,000 for the powerwall? It's $5,500 for 13.5kWh, which should be enough for nighttime loads in many houses (but may require some inconveniences, like not running the dryer at night).
You are right that it does not yet work out, it's $0.17/kWh for the powerwall (assuming you fully charge/discharge it each night) + cost for panels. Given that grid-disconnected users would want some buffer, an off-grid system probably works out to ~$0.40/kWh all in for battery-stored electricity
You could save a big chunk of this by some habit changes, most of the cost comes from the batteries, so scheduling energy intensive activities to run during the day reduces your cost for them to $0.10/kWh or so.
Honestly I am surprised how close these numbers are. I initially was sure the grid would survive in cities, but now I am not so sure. In 10 years these numbers will likely be half what they are now (batteries in particular will be way cheaper). It might all be enough to kill the grid in many places.