The consequence of free will is that we can freely choose. That these choices have consequences that are not always plesant is part of this freedom... no freedom to make a mistake is no freedom at all.

Gods laws are warnings on what not to do as the consequences of those decisions will hurt the person (and others) if they go through with that choice... they are warnings... the person still has the free will to choose and hurt themselves.

The devil created himself by his own free will in rejecting God and God's advice IMDHO.