The first-past-the-post voting system contributes to keeping two parties in power, but that's not the whole story. With the same system, both the UK and Canada have three main parties, plus a powerful separatist party in Scotland and Quebec. At the moment, the Conservative government in the UK is supported by the Democratic Unionist Party from Northern Ireland.
Besides the voting system, there's a certain desire for uniformity in American culture, in order to keep the diverse country together. We all know certain rituals in public schools from TV and movies, for example reciting the Pledge of Alliance, electing a class president, creating a yearbook and going to prom. I think part of that planned uniformity is dealing with familiar political parties when you move to or do business in another state.
This doesn't mean that the two-party system is stable in the long term. After all, the Republicans used to be the more progressive party.
One state where other parties have some influence is New York, where fusion voting is a tradition. Fusion voting means that candidates are allowed to run for multiple parties on separate ballot lines. It's also allowed in some other states, but only in New York do endorsements by smaller parties influence the candidates' programs.
For example, Andrew Cuomo was re-elected as Governor of New York this week for the Democratic Party, the Working Families Party, the Independence Party and the Women's Equality Party. He would've won a majority with just the Democratic votes. But in 1994, his father Mario Cuomo lost to George Pataki, even though Cuomo received more votes on the Democratic ballot line than Pataki on the Republican ballot line. For the next four years, the eight parties that received more than 50,000 votes in the 2018 gubernatorial election will have automatic ballot access for all elections in the state of New York.