Nor should we base them on the whim of the SCOTUS. Under the 10th Amendment, the people of the individual states should make their laws as they see fit.
California has a fairly broad consenting adults law, and I wouldn't vote to change it, but I don't want to allow the feds to seize the authority to change Texas law, because the change would suit my opinions.
This wasn't decided on a whim. The court challenged Texas to justify the law on a rational basis and they couldn't do it.