Market forces always apply and it would make an interesting application and lesson to those who think good ideas should be law. Lessons which of course would be lost on them but we know how that story goes.
First, this would apply to state agencies, probably mostly MediCal but any state entitlement program and effectively put them at the back of the line any time there is a supply issue. With respect to generic drugs it is probably a non-issue but newer drugs will go to those willing to pay. That means less for the entitlement programs and more for private or non-entitlement patients.
Second and more importantly, a possible supply bottleneck for Californians. Effectively a two-tier or class based market. This will lead to more attempts at regulatory retribution and laws to punish suppliers who don't follow special snowflake rules. It would be interesting to watch because California is "create your own weather" big but that goes so far. For example, it would put upward pricing pressure on the VA. Every penny price increase on the VA is a price increase on California too which reduces bargaining power for both of them.
The reduced supply for Californians would come about indirectly because of the inevitable result of trying to regulate beyond its borders. When suppliers sell first to the other players in the market, California Democrat legislators will of course cry foul and then do what they do best as they try to keep playing the welfare without consequences game. That is when the pain will spread to non-entitlement Californians.
Play by our rules or else doesn't work when you're not the biggest fish in the market and when they, the multi-national drug company, can hide behind distributors et. al. you can keep them somewhat at arms length. Resulting regulations and penalties would simply increase the cost of doing business in California, again, and California is going to pay, again.
Yes, this law is an obviously bad idea but if you want to watch the entitlement world burn, voting yes will have a price borne mostly by the FSA for a change.