California has been in budget crisis for most of the time I have lived here which is one of the reasons for the very recent situation with the surplus. Several years of surplus does not necessarily make the process for dealing with a lack of surplus any less interesting unless you assume that the business cycle has disappeared.
CA changed its budgeting laws during the last financial crisis to lower its dependence on transient high-income events like IPOs, and most of CA's budget problems stems from the state getting back less from the federal government than its residents pay in federal taxes (in contrast to red/flyover states, which for all their talk about low taxes would be bankrupt without the largesse provided by CA and NY).
Notably, California had a budget surplus despite a relative lack of high-profile IPOs the past several years.
It helps that many of CA's biggest industries are at the high-end of the value spectrum (i.e., tech, biotech, Hollywood, and video games).