Well, it's not like people are walking across the border and can pay in-state tuition. They have to have three years of in-state high school under their belt first, same as any other California resident. The CA Supreme Court didn't rule on the wisdom or intelligence of the law. They merely ruled on the Constitutionality of a law that was enacted in 2001 and was overturned in 2008 by a lower court. The CA Supreme Court overruled the lower court.
Even in the decision the justices stated that it wasn't their job to make policy, but rather "the legal question of whether California's exemption violates Congress's prohibition or is otherwise invalid," which is a pretty clear inference that they don't much agree with the whole mess, even though it's legal. They made their decision based on the law and the wording of the legislation in question. Since the law that allows the in-state tuition fees doesn't mention that in-state residency is a requirement, only that three years of high school is required, regardless of residency or immigration status. Don't blame the court, blame the idiots who wrote the law.