Elections are won by appealing to the center, where the majority of the populace sits, while not alienating (too many) people on your flank.
Two party politics is a lot of this problem. Ranked choice voting would help a lot. But even in parliamentary systems, coalitions have to gather support in the center without pissing off the edges too much.