Southern California is vulnerable to that, but not Northern California. California is the largest food producer to the US, including about 1/3 of our fresh vegetables and 3/4 of fruits and nuts. The country wouldn't starve without California, but I sure wouldn't want to experience a situation where California stops exporting to red states.
The agricultural parts of California are largely red. In this hypothetical scenario, why wouldn't they pull a West Virginia and secede from Southern California to be with their ideological brethren?
If you look at an electoral map by county of the United States, you'll see that the major cities are blue and almost everything else is red. The everything else is the part of America that produces food and manufactured goods.
Yes, just a thought experiment. I grew up on a farm in Northern California (mostly rice and tomatoes), lived in the bay area for 20 years for college and working in tech, and now live in a red state. I tell people the same thing you do about blue cities and red everything else. It's bizarre how many people in red states and blue states don't know that (and don't want to believe it).