Formal logic would lead to bad things, for example, imagine a state bans sex with animals. You'd be guilty of having sex with your wife because she's an animal.
The law isn't precisely stated so formal logic is the wrong tool.
Law uses different sorts of logic. If you are curious, take a look at LSAT questions. That's the sort of logic and reasoning lawyers value.