It turns out that the biggest cost of California energy is not generation, it's distribution and transmission.
Highly distributed energy lessens the peak demands on the T&D system, which means that the T&D system can be smaller, which greatly reduces the fixed cost of T&D. Utility scale solar requires greatly expanding transmission lines, to the extent that lack of transmission is the biggest barrier to adding solar to the grid in most of the US.
So even if installation costs of solar are higher on the grid edge, it usually makes a ton of sense, and this is evident in the payoff times of NEM3 systems that include batteries. As batteries get cheaper, or there's more vehicle-to-home systems out there, it will only increase.
This lessened need for T&D is the true reason that utilities in California hate solar and need to stop it. They can take a guaranteed rate of profit from anything they get to spend on T&D, but the same isn't true of generation. So utility solar, which requires building more lines and beefing up distribution substations more, lets them profit much more than residential solar.