Much of California(Cali) is great for growing plants. It's land is futile unlike a desert. What it doesn't get a lot of is rain, it depends on water shed from mountains, sometimes causing floods.
Most of Cali's water is coming from watershed not groundwater. This water rather than being allowed to flood, or head strait to the ocean, is being diverted, stored, and used differently, optimally. It can even grow better than the wetter states with more sunshine and great soil and milder winters.
As an old Cali native, let me enplane a little of what's happened.
The Good farming areas prosper and grow. Little of the farming land slowly turns into homes. Jobs happen, the bay area growth explodes as people move from across the country, the cost of living is skyrockets where people are willing to commute 1-2hr from the cheaper faming places. Those farming lands turn into suburbia even though they are built in flood zones. Then silicone valley happened and and the above happens times 10.
Faming still happens, but making use of less fertile land, further away from the riverbanks, as those area's became cities. Farming was already employing flood irrigation for much of the land anyways, so it's just more of it. The flood irrigation is practically a controlled simulation of the natural flooding that's suppose to happen.
Those Almonds that use so much water is where I grew up. I watched as areas that experience yearly flooding get turned into track homes from the 90's to the late 2000s faster than new schools could be built. This development wasn't just the valley, but further up the hills too. I even saw creeks turned into roadways, and springs capped with pipes leading out of them heading to who knows where.
There has been lots of turmoil from North Cali and South Cali, a lot because of water. but also because the people are so quite different. The big cities of LA/San Fran and their area vs the rest of Cali are very different too. I, and others I knew, where in favor of splitting Cali every time it came up. Much of southern Cali is desert, and is also where much of the population lives with their well watered lawns and swimming pools. Either pumping up the water or taking it from the north. I remember during the 70's when the north was under strict water usage "if it's yellow let it mellow if it's brown flush it down", but the south, where our water was sent, was not.
Think I've lost people, this long post was suppose to be about much of Cali is a great place for agriculture. It lacks rain through out the year, but that doesn't mean it's all desert and the way agriculture uses it is very much like how Cali naturally used it.