Good question, though it sounds like more of a topic for a political science forum, or maybe even a psychology forum. I can't offer a complete answer, but I have some comments.
It's probably largely a product of both convenience and mind control.
Convenience - Political parties are prominent feature of the modern political scene. While thirteen parties might better represent people's diverse interests than two, they would also make politics even more complicated.
Moreover, not all parties are equal. Some parties will inevitable be bigger and more powerful than others. Some people may thus be discouraged from allying with parties that they deem too weak to accomplish anything.
Mind Control & Manipulation - In many, if not most, countries, political parties are largely controlled by corporations and other special interest groups. It's to their advantage to marginalize all but two parties that can be more easily controlled and manipulated. A single party would be even more efficient, but a minimum of two parties are necessary if you want citizens to think they have a voice in government.
Until recently, Washington State was one of just three states with a "blanket primary" that allowed voters to vote for any candidate. The state's residents are said to be about one third Democrat, one third Republican and one third independent.
Several years ago, the blanket primary was torpedoed. Soon after, the Seattle Post-Intelligencer offered dual endorsements, listing their favorite Republican candidates and favorite Democratic candidates while ignoring all the others. See how it works?
I've also heard the possibility that left-wing tendencies (to move
towards change) and right-wing tendencies (to maintain the status quo)
lead to the most stable system, and we have evolved (biologically and
politically) to maintain exactly this.
Interesting. Left-wingers are more likely to challenge the system, while right-wingers tend to defend the status quo (in the U.S., at least). However, I'm not sure if the right-wing status quo is the most stable system. Nor is the most stable system necessarily the best. Would we want a nice stable society where three multi-billionaires have more money than all other citizens combined?
However, it is true that governments generally have both supporters and critics, and it would make sense for both groups to ally into powerful groups rather than tiny, insignificant parties.
In the U.S., Republicans (generally regarded as right-wingers) tend to be very supportive of corporate policy and war, while typically clamoring for more environmental "development." Such a party is obviously going to get enormous support from government, the media and the elitists who control them. Conformism (e.g., peer pressure, the bandwagon effect) alone can easily swell such a party's ranks.
Ironically, the same power brokers may support the "alternative party," which may actually be an example of "controlled opposition." For example, the Democratic Party is viewed as a liberal party, even though Obama was one of America's most right-wing presidents ever. I was one of many people who didn't vote for Hillary Clinton in 2016 because she's so right-wing, she's almost off the chart.
In summary, the rich and powerful have created a de facto two-party system that was long ago labeled "Demopublican," because both parties are increasingly hard to distinguish from one another.