There are two major reasons for this.
One of these reasons is political. Consumer protection laws tend to be very popular. The reason for this is that consumers can be badly harmed by companies. In these situations, there tends to be a lot of publicity that shows the "little guy" being harmed by some big, faceless company. It is therefore politically fairly easy to pass consumer protection laws and legislators can become fairly popular by doing so.
The other reason is more economic in nature. Economic transactions depend on the two sides having relatively equal amounts of power and information. In the case of consumers buying from companies, this is not true. Consumers have access to much less information than firms do and they do not have the sort of financial clout needed to ensure that the companies cannot harm them.
In these ways, it is both necessary and politically easy to enact consumer protection laws.