I don't think I need to spell out that Italy's laws and government are probably not what most people think of when they think of "perfectly functioning", right?
Markets often work well even if they're not "perfectly functioning". Governments certainly solve other kinds of problems decently even if they are not "perfectly functioning" either. I'm pretty happy with the health care here in Italy, for instance.
Only if there is a perfectly functioning market. Which there often isn't in many cases. Hence the laws.