This was definitely expected. The argument that the voters couldn't enact legislation that the lawmakers can was a very strange argument.
While Prop 22 was a blatant effort by Lyft/Uber/Doordash to write their own laws, the court probably was in the right here, in that it was technically a legal maneuver, albeit a sneaky one.
What we really need is reform to ensure that nothing like Prop 22 can ever be allowed near the ballot again.
As someone living in a red state that, thanks to wild gerrymandering, has a government that actively writes laws against the majorities wishes, I can only dream of having the power of the people to write and vote on laws.