The problem is, many unconstitutional laws are written and enforced for years before they are struck down as unconstitutional. Remember, the decision in New York State Rifle and Pistol Association v. Bruen, overturning a New York gun safety law, was law and enforced to the detriment of many for 111 years.
And the very next week after that law was overturned, NY wrote even more unconstitutional laws in direct contempt of the SCOTUS and it's Bruen decision. They do this because they know there will be no consequences for doing so, as the electorate is too stupid to care they do these things.
Leftists know from the start their laws are unconstitutional, but they know they will be able to oppress their targets for years with those laws anyway. That's Soviet style governance.