Some laws are created in order to set a penalty for an unruley act.  This acts as a deterrent.