For the record, I am well aware that this state of affairs is relatively recent, given that the PRI's de facto status as Mexico's only viable political party only began to unravel in the 1980s. However, by 2000, when Mexico had its first truly competitive presidential elections, a multi-party political ecosystem had developed that is very similar to what exists today, even if the specific parties filling the respective niches have changed in some cases.
Well presidential systems don't always lead to 2 party systems, just take a look at Brazil's chamber of representatives.
The PAN existed because the PRI allowed for smaller parties to exist and contest elections in order to claim Mexico was a democracy, and to show the depth of their own public support. The PRD was formed much later as a split from the PRI over electoral fraud, and with pressure mounting the PRI continued democratizing the country. It's untrue to say that by 2000 Mexico had its first competitive elections, as the 1994 elections were actually seen to be free and non-fraudulent, although the PAN and PRD struggled to gain media coverage.
After 2000 the PRI could have collapsed - it was an authoritarian party which had finally lost power, but neither the PAN or PRD were able to become parties that attracted the support of all Mexicans. The PAN and PRD were very ideological institutions that didn't want to compromise or shift towards the centre. Vincente Fox won the first Presidential election for the PAN but was seen as having to go against the party's leaders. But the PAN and PRD's staunch ideological positions meant that they appealed heavily to their core voters (PAN and west-central Mexico, PRD and Mexico City) but not to everyone, and the PAN were unable to deliver of Fox's promises after the 2000 election.
The PRI maintained control of many governorships, and this system meant that just because they had lost the Presidency they were not dislodged from politics entirely. Local governors can also be incredibly helpful in aiding local politicians, and so the PRI continued to do well across Mexico, and perhaps crucially did not split during their 2002 leadership elections.
So after 2000 we have 2 parties that appeal to 2 distinct voter bases (PAN with richer voters and Catholics, PRD with poorer, urban workers) and the PRI who were able to secure more widespread support due to being the only party with consistent media coverage everywhere in Mexico but was seen as corrupt and incompetent. The PAN and PRD's party leadership stood by their ideological stances and did not expand the parties throughout every demographic of Mexico, and the PAN were unable to exploit their electoral successes.
In the US I'd argue both the Democrats and Republicans have a greater deal of ideological flexibility, and both are "big tent" parties where people like Rand Paul, Mitt Romney, and Donald Trump can be members of the same party despite being very different ideologically from each other. Both the Democrats and Republicans have consistent media access across America and attempt to appeal to a wide variety of voters, leading to a 2 party system. Whereas in Mexico the parties are more rigid in their ideology and less willing to appeal to all voters in every state.
Sources: Greene, K. (2007). Why Dominant Parties Lose: Mexico's Democratization in Comparative Perspective. Cambridge: Cambridge University Press.
Langston, J. (2010). “Governors and "Their" Deputies: New Legislative Principals in Mexico” Legislative Studies Quarterly, 35(2), pp.235-258.
Langston, J. (2017). Democratization and Authoritarian Party Survival: Mexico's PRI. Oxford:Oxford University Press