IMHO, the two parties have created a stranglehold on the election process in this country. Not particularly good, that, but I also can see how it’s evolving to represent the will of the electorate. Both parties have been taken over by different, newer factions than controlled them in the past. The Republican Party has moved more toward the center as Trump (former democrat) has proven to be its leader/figurehead. The democrats have shifted to the left, embracing socialist/communist rhetoric, as evidenced by the rise of Bernie Sanders, AIC, democratic-socialism, and the next likely mayor of NYC.
In short, there are only two viable parties, but they both are evolving to represent the shifting politically dominant factions of the electorate. Trump won because he’s more centrist and dems are losing because they are taking increasingly more fringe positions.