The fact the US has two major parties results from a number of factors.
1. The habit of electing from single member districts by plurality or majority for such offices as the legislature (whether state or federal) makes it difficult for third parties to establish themselves, especially as the existing parties steal their ideas, and with them their supporters.
2. The need to organize legislatures to function adequately tends to force coalitions at state or federal government levels that incorporate locally or regionally successful third parties.
3. Third parties often are forced out by legal manipulations by better established parties. Examples include onerous signature requirements for small party ballot inclusion as opposed to automatic inclusion for "major" parties, something that typically means the top two by voting numbers in the previous election.
4. Party affiliation tends to be passed down within families. Although that gets muddled due to "mixed marriages" and internal family dynamics, there remains a tendency for individuals to associate themselves with one of the national parties, maintaining their stability over time.
5. Population mobility lead spread of the main political parties during the rapid expansion that occurred in the 19th century. People took the names and general leanings with them to new places and adapted them to their new environment. One consequence of that was to give the national parties a broad population base.
6. The population expansion and diversification that came with immigration in the last half of the 19th and first quarter of the 20th century, along with a combination of party organization recruitment of and takeover by new Americans operated to inhibit growth of minor parties. Ethnic diversity also discouraged narrow ideologically based programs. This and the previous factor go quite a way to explaining the nearly total lack of meaningful content in US party platforms.
The interactive map at
Suggests remarkable stability over a period of 12 years, and it probably extends further back.
As an aside, I know of no evidence that third party vote totals, in most places under 5%, had a meaningful impact on this election, although they likely did in 2000. Jill Stein probably drew around half of her roughly 1% share from Clinton, and Gary Johnson a similar fraction of his 3% - 5% from Trump. In Utah and Idaho, Evan McMullin collected most or all of his votes from Mormon coreligionists opposed to Trump, who still beat Clinton by 19%; the total of Trump and McMullin votes in Utah is similar to Republican votes in other statewide contests.