The seven commandments function in a few different ways in the book. Orwell certainly wants us to keep all of these uses in mind.
First, the seven commandments have the semblance of being fair. All the animal are equal, and most importantly Animal Farm is a society of law and order. Hence, the establishment of this new community seems just from the beginning. Law is the solid foundation.
Second, as time progresses, the laws begin to change slightly, a prepositional phrase at first. Here is the quote:
‘It says, ’No animal shall sleep in a bed with sheets,” she announced finally. Curiously enough, Clover had not remembered that the Fourth Commandment mentioned sheets...
This slight change shows that the laws were really to benefit the ones in power. Not only did they have the skill to change it, but they changed it to benefit themselves. Hence, the laws did not bring equality and did not create a just society.
Finally, when the pigs had absolute power, the laws were changed more brazenly. Here is what the text says:
There was nothing there now except a single Commandment. It ran:
ALL ANIMALS ARE EQUAL BUT SOME ANIMALS ARE MORE EQUAL
The point here is that there is no law. It is a joke and completely contradictory, as the law only protect those in power.
In light of this, Orwell is saying: Beware of laws!