This flip-flopping happens because there is no commonality to find. One of the only (effectively) two major political parties of the United States is completely uninterested in governing. They have no policy. They have no plan for governing; they don't like governing. Their only goal is the piecemeal selloff of government powers to the highest bidder, and they convince their stalwart followers of this by making sure…
The GOP isn't some weird guys who can't govern, but an incredibly powerful group that works almost exclusively for the capital owning class and uses social issues to empower that class. The GOP caters a bit to the workers class but not a lot and is actively radicalizing them to believe they have the same interests as the capital owning class. The culture war is by accident. If the GOP could do this all without the culture war, selling hate, etc then it would. These are merely tools for an end.
The Democrats are almost as bad, but also are beholden to some level of will of the working class, but generally default to the whims of the capital owning class as much as practically possible. The Dems need to get the working class on its side to continue to exist. The pure capital owner party is the GOP and they can't compete against them without this rhetoric. Hence, a lot of Dem ideology being lip service for populist worker issues and actual change from Dems is very rare, and when it happens, its under the approval of the many/most capital owners (see Obamacare being a mandatory private insurance program instead of a Euro-style socialized medicine program.)
The better governing of the dems is by accident. If the dems govern better its only by accident due to the strong influence of the middle-class dependent on good government to survive, and if the dems could maintain power with more corrupt governing, they would.
This is your classic conservative vs liberal divide that defines nearly all modern capitalist nations.
The difference between the two parties isn't that strong. Under capitalism, the government is a capitalist government and is nearly fully corrupted by it, regardless of party. The only real fix is to replace capitalism with socialism, but neither party will allow that, so here we are with the usual back and forth and hiding issues with workers class and capitalism under whatever social issues of the day best distract.