When one of the parties starts to pull ahead, the one that's behind just adopts enough of the other's ideas in order to bring things back into balance. Notice that Republicans are now the party of big spending-- it wins votes! And notice how Obama goes on about "tax relief," not to mention Clintonian centrism.
Also any party that has been in power long enough begins to be seen as (and to actually be) a lot more corrupt, and the party out of power brands itself as the party of "reform" or "change." So they trade back and forth on that, too. Basically both the parties are too smart and agile to let history pass them by, and as long as we have a "first past the post" electoral system, we will only ever have two parties.