Why so much endemism?
Although climate and soil variation can help explain why there are so many plant species in California, it does not completely explain why so many are endemic or restricted to California. Endemic species can be classified as paleoendemics (species that were once widespread, but are now restricted to California) or neoendemics (species that originated or evolved here).
Paleoendemics
California has not always had the topography and climates it has today. Global climate has changed, mountains have risen, plateaus have collapsed, and the oceans have fallen and risen.
The graph in the image below shows global temperature change from long ago (at the bottom) to today (at the top). The left panels show geologic changes over time (maps from cpgeosystems.com). These show most of cismontane California emerging from under the ocean. They also show the collapse of the Great Basin (now desert areas between Sierras and the Rocky Mountains). That area was once a higher plateau that was cooler and more mesic (moist) than it is today. With its collapse and the rise of the Sierra Nevada, the Great Basin dried and species that once flourished there could no longer survive.
Paleoendemics are species that were once more widespread, but are now confined to California.
Some species lost much of their habitat as climate changed. However, due to California's large variation in climate, topography, etc., it contains small regions where some of these species can still survive. Two famous examples of paleoendemics are the coast redwood (Sequoia semperviron) and the giant sequoia (Sequoiadendron giganteum).
Fossils indicate that the coast redwood used to exist into Idaho. Today, Idaho is too dry for this species, and the coast redwood is confined to a fog belt along northern coastal California and southwestern Oregon (i.e., the northwest corner of the California Floristic Province).
Similarly, fossils of Sequoiadendron chaneyi (giant sequioa's direct ancestor) are found in Nevada (part of the Great Basin). It existed there before the collapse of the Miocene plateau, when climate was cooler and more moist. Today, the only remaining species of the genus, Sequoiadendron (once found throughout the northern hemisphere), is giant sequoia. It is only found in pockets in California mountains where water exists close to the soil surface.
Neoendemics
Neoendemics are are species that have arisen by speciation events within a geographic region and have never existed outside that geographic region.
The California Floristic Province has many neoendemics because...
1) It's mediterranean climate is found nowhere else in North America and was a novel climate when it developed.
Why is that important?
When the mediterranean climate developed in California, there were no pre-existing species that were well adapted to that climate in North America. It was a new climate that presented new challenges (and new selective forces). Most species that adapted to the new mediterranean climate in California are thought to have descended from species that occupied semi-arid regions of Mexico and the southwestern US (not areas with mediterranean climates). Many California neoendemics are now so different (phenotypically, genetically, and ecologically) from their ancestors that they are considered different species from those ancestors.
This same process occurred in other geographic regions with mediterranean-type climates (Chile, South Africa, southwestern Australia, and the Mediterranean region, itself). Though similar in climate, these regions are widely separated. (They are on different continents.) When the mediterranean climate developed in each of these five regions, the species that adapted to it descended from species that were already on that continent. The result is that each of the five mediterranean regions has its own unique set of endemic species.
Another reason that the California Floristic Province has a lot of neoendemics is because...
2) Its variation in climate and soils, and its mountain ranges, produce conditions that promote evolutionary divergence.
Differing conditions favor different adaptive traits. Therefore, seeds of a species that are widely dispersed to areas with different ecological conditions will establish populations that may experience different selective pressures, favoring individuals with different traits in different locations. This will tend to cause the populations to diverge genetically and phenotypically over time, potentially becoming different species.
Speciation is generally only possible where gene flow between populations is low (even if selection is pushing them apart). Mountain ranges and other topographic features in California often limit gene flow (by limiting pollen flow, pollinator movement, seed dispersal, etc.). This allows divergence and speciation to happen.
As a result, California appears to have a large number of species that evolved here (diverged from ancestral species) and occur nowhere else.