So does the Constitution. Preventing interstate trade barriers was the original purpose for the Commerce Clause.
A trade barrier would be enforcing higher standards on across the border trade compared to within the border trade. So if California says only green eggs may be sold in the state, as long as those are applied equally to other states, then they are within their rights.
CA’s law is not an interstate trade barrier. It is simply regulating a market within its borders.