Deferring to the law is a thought-stopper. It's entirely possible that something is illegal but should be tolerated or accommodated in some circumstances.
Equating the law with a perfect moral code - i.e. it is always wrong to break the law and always good to obey it - is a flawed way of understanding human society.