You know, we used to have laws like this: segregation laws. The people who weren't subject to the laws became abusive to the others, and the people who were subject to the laws rebelled against them. The situation was very unjust.
Also, "[using] the difference in the laws to gain an ... advantage" does not equal state mandated discrimination. It's more of a state-accepted, or allowed, discrimination. State mandated discrimination is something a little more explicit, like when Zimbabwe's President Mugabe enacted laws that took land from one racial group and bequeathed it to another.
Your second paragraph isn't particularly applicable, because what you're describing doesn't meet the requirements to be considered a double blind randomized trial, modeling after drug testing policies.
The whole point is to produce sets of people that are drawn from an identical distribution where the only difference is whether the law applies to them or not. That way any changes that result can be confidently attributed to the law itself.
Right now, when we see differences between California and Iowa, there are a million other factors that may be causing different outcomes than a single law.