Why do we have so many laws that no one likes? One reason is that we have legislative blocs that "trade" with each other to pass laws that individually don't have majority support. For example, assume that groups A, B, and C each represent about one-third of the voters, and the numbers represent how each group thinks about each proposed law:
Neither law X nor law Y could be enacted alone, but if legislators that represent A and B cooperate with each other they can get both laws passed. Sure, the legislator that represents group A knows that his voters will be mildly displeased that he voted for Y, but X passed too so they're happy in the moment. Similarly for B and Y.
On the other hand, law Z might never be enacted despite broad support. How? Legislators for group B might condition their votes for Y on agreement from A to forgo Z.
Extrapolate thousands of laws and thousands of overlapping interest groups. A very small group that supports a very unpopular proposed law might be able to get that law enacted if they wield a pivotal vote on a larger issue.
The end result is that we end up with lots of laws that don't enjoy majority support but were enacted due to "horse-trading" exchanges among legislators who are primarily concerned with re-election and looking good in the moment.