We'd be in a much worst situation if the farms didn't produce the food they do. The entire continent would face food shortage, and the world's economy would be hit. Just see what happened when Ukraine's farms got knocked out of the playing field, and scale that up by California's farming supply to North America.
Ukranian wheat is a staple. Californian pistachios are a luxury.
An entire continent with a shortage of California pistachios does not mean people starving in the streets and the world economy imploding. It means a handful of really unhappy pistachio plantation owners and millions of people happily eating Georgia peanuts (only half of which are artificially irrigated, they get plenty of water from the sky) instead.
Unfortunately, the pistacho farmers are wealthy and connected, so they can shift the narrative to "turn off your expensive city water while you're brushing your teeth" while they draw more in an hour than years of toothbrushing would use.
Barring eliminating long standing (pre-statehood) water rights and the entire system (likely not to happen) they probably just need to pay these plantation owners not to grow stuff.
If you're farming in a desert and using 2020s technology to destroy the ecosystem, the fact that 1800s governments, lacking any ability to accurately measure the health of underground aquifers, allowed you to use a windmill to pull a little water out of the ground is completely irrelevant.
Perhaps, though is California really the best place on the continent today to grow what it does? Perhaps 50 or 80 years ago it was reasonable - is it today? I agree that California's agricultural output is important, but it would also be strategically important to move some of to places better able to sustain it.