Social norms, like law, help to control conduct. Some people fear social ostracization perhaps even more than legal punishment. It is this fear that causes people to act within regularly acceptable social bounds of conduct. Of course, one may be more interested in acting according to the social norms of a rogue group whose own norms of conduct may challenge the law.
In the video below, the guy chooses an unorthodox way to try to activate his key card - and pays the social price.