Government doesn't have unlimited power to alter reality, there are countless examples of legislation being ineffective or having unintended consequences. The canonical example is prohibition of various drugs, but more recently the "ban the box" initiative is quite illustrative:
https://www.theatlantic.com/business/archive/2016/08/consequ...