If a law is immoral or unethical, then you run into a moral or ethical issue, but this law was simply a way to calculate taxation on real estate sold under certain conditions. There is nothing immoral or unethical about that.
Did I say anything about the law per se? No. But you seem hell-bent on defending the hypocrisy of leftists who are just fine with taking advantage of what they claim to oppose.