Even though markets aren’t perfect, most regulations end up being counterproductive. Other regulations, like contract enforcement and rules against fraud, help.