In 1969, the Republican Congressman and future president George HW Bush told the House of Representatives: "We need to take the sensationalism out of [family planning] so it can no longer be used by militants who have no knowledge of the voluntary nature of the programme, but rather are using it as a political stepping stone."

A couple of years later, adviser Patrick Buchanan wrote a memo to then president Richard Nixon suggesting precisely the opposite stance on abortion. "If the president should publicly take his stand against abortion, as offensive to his own moral principles … then we can force [his potential Democratic challenger] to make the choice between his tens of millions of Catholic supporters and his liberal friends at the New York Times and the Washington Post." A week after that, Jill LePore points out in the New Yorker, Nixon shared his "personal belief in the sanctity of human life – including the life of the yet unborn".

The path that the Republican party has taken over the last 40 years owes nothing to political principle and everything to electoral strategy. Its pandering to the religious right, like its courting of the white vote, was not the ineluctable outcome of an over-arching political philosophy but the product of crude majoritarian calculations crafted to win elections.

That's why reports of the party's imminent death due to demographic changes have been greatly exaggerated. Since its defeat this month, it's been suggested the increase in the proportion of non-white voters (particularly Latinos), growing secularisation and cultural tolerance present an existential challenge that can only be met by a fundamental reassessment of the party's core values. Not so.

The Republican party primarily exists to represent the interests of business elites in the political sphere and redistribute power and resources to the wealthy. Its enduring values beyond that end have always been up for grabs. It has been anti-slavery and anti-Catholic, interventionist and isolationist. Its most recent devotion to xenophobia, nativism, Christian fundamentalism and racism is the means by which it has cohered a coalition to win elections. Issues of gay marriage and abortion may be genuinely important to much of its base, and prejudice may guide some of its supporters. But while they have been central to the party's message, they are not essential to its meaning.

For half a century this worked. Its southern strategy of making a clear but deniable pitch for white votes in the post-civil rights era delivered a stronghold in the south and a foothold in the northern suburbs. When white voters made up 90% of the electorate, that was as morally repulsive as it was strategically smart. In the six presidential elections prior to 1992 Republicans won the White House five times, averaging 52.5% of the vote. This election shows it doesn't work any more. White voters now make up closer to 70% of the electorate and will fall by roughly 3% every cycle. In the last six presidential elections Republicans only won a majority once.

The trend is not just demographic but cultural. Take religion. Obama won those who say they have "no religion" by 70% to 26%. In 1944 that group comprised one in 20 Americans; on election day they made up 12% of the electorate; by 2024 they are projected to be 20%.

Clearly the Republican party is in desperate need of realignment. But this is not unprecedented. Until the mid-60s, the Democrats were the party of both segregation and integration – depending on where you were in the country. Anti-Catholic prejudice used to be a mainstay of American electoral culture. When Democrats nominated Al Smith in 1928, a survey of 8,500 southern methodist ministers found only four who would back him. Today six of the nine supreme court justices are Catholic (the other three are Jewish) and the Republican nomination was a contest between a Catholic (Rick Santorum) and a Mormon (Romney). The Catholic won the evangelicals; the Mormon won the Catholics.

The point here is not that America has an innate genius for eroding discrimination over time, but that demography is not destiny and social identities are not endowed with electoral inevitability. The country's whitest state (Maine) and whitest county (Mitchell, Iowa) both voted for Obama. One in three Latinos in Virginia voted for Romney; in New York it was just 1 in 10. While the Republican base has become more monoracial, its leadership has become more multi-ethnic. The party now boasts more Latino senators (both backed by the Tea Party) than the Democrats, and four of the five non-white governors. People's electoral allegiances are fluid, dynamic and contingent on their perceived interests. That is what lay behind Romney's claim that Obama won because he promised "gifts" like healthcare, amnesty and student debt forgiveness to certain demographic groups. He was blaming the voters for being insufficiently selfless to elect him.

The Republican challenge is to come up with better "gifts" for more people. It doesn't take a great leap of imagination to see how it could do that. Immigration reform allowing cheap labour for farms and industry, attracting foreign talent, and decriminalising long-time residents would sit far easier with the party's free-market values than an expensive, ineffective big government project to build a wall along the border and more bureaucracy within the immigration service.

Similarly, Republican campaigns against gay marriage and abortion are an awkward fit with its hostility to government intervention. A party that stands for personal liberty is less convincing when it also insists on forcing women who want to terminate pregnancies to have a transvaginal ultrasound. That won't persuade those who think abortion is murder. But the truth is nothing will, and the party needn't stake its electoral future on them. Republicans could treat the Christian right with the same disdain that Democrats treat trade unions – offering them platitudes, taking their votes and delivering them nothing because they have nowhere else to go.

Abortion and gay marriage are only election issues because the Republicans have made them so. Until the late 80s Republicans were more likely to be pro-choice than Democrats; this year Democrats won the Catholic vote.

Ultimately, the billionaires bankrolling the Republican party want a return on their investment. That will make the party's political instincts for survival far stronger than indulging prejudicial impulses and religious conviction. The party's problem is not one of principle but strategy. It made a calculation that no longer holds, because the numbers changed. Now it has to do its sums again.

Twitter: @garyyounge

• This article was amended on 5 December 2012. The original said the Republican had won five of the six presidential races prior to 1988. That has been corrected to "prior to 1992".