BillyDeeWilliams1990
It's not so much that they were incredibly determined to maintain apartheid, but that maintaining apartheid had few costs, and many benefits, until the 1980s, which is when the system began to crack.
First, it's important to remember that, after World War II, which was when apartheid was codified and calcified, South Africa was about 20% white, which provided a much larger demographic and economic base than in 1994. Today, 25 years since the end of apartheid, South Africa (according to official government stats) is 8.4% white.
And in fact, at the time that the groundwork was being laid for apartheid, the most salient political division in South Africa was between English-speaking whites (generally, liberals and pro-British Empire) and Afrikaans-speaking whites (generally, conservative and supporting independence), as whites were already the only group with any real political power. Generally, the former opposed apartheid and the latter supported it, since apartheid was also identified with the ultimately successful push for independence from the Empire, which was granted in 1961. The politically dominant (though just barely) Afrikaans-speakers did not succeed in healing this division, despite their willingness to mend fences still broken since the Boer Wars (the Afrikaners had always perceived greater danger from the indigenous black African population than the English-speakers). However, most English-speaking whites accommodated themselves to apartheid, though a subset remained vocally dissatisfied with the institution through the time of its abolition.
The immediate catalyst for apartheid was, like so many other movements, the aftermath of World War 2. During the labor shortages occasioned by the war, the black population had migrated to the cities and there acquired a measure of economic power. The whites, especially but not exclusively the Afrikaners, perceived a growing threat to their own economic power, and their political power. Apartheid was the solution, and did succeed in barring the black population from political power for a long time. But the problem of labor shortages never really went away, and the apartheid government had to take increasingly drastic and even outlandish measures to control the economic activity of the black population (such as the Bantustan project), even as the white population shrank proportionally.
It is difficult to overstate the importance of economics to both the creation and maintenance of apartheid. After the war, South Africa, like many other nations, entered a sustained period of rapid economic growth. But this process was even more pronounced and dramatic in South Africa than elsewhere. This is likely due to SAF's lower level of overall development than other booming economies like the United States (including of its immense natural resources), plus large amounts of available capital, along with a (white) economic and political elite that was fully on-board with and already largely integrated into the structures upon which the American and British-led global economy was built. This last aspect can be contrasted with, for example, India, whose post-British rulers were not at all convinced of the utility of the global capitalist economy, some of whom were openly socialistic, which used command-economy principles in building the post-Empire economy, and flirted with the Soviet Union.
In short, the apartheid government delivered to its observers in London, Washington, New York, (eventually) Brussels, and Switzerland sustained economic growth and opportunities for investment unlike anything else in Africa (even in Rhodesia/Zimbabwe, which also underwent a more minor boom). This gave the apartheid government considerable credibility in the international community, and they earned powerful friends.
And then, there is the threat of Bolshevism. Between the end of World War II and 1980, the vast majority of Africa was decolonized, sometimes peacefully, sometimes bloodily. But in all of these, the Cold War loomed large. In many of the decolonized states, from Egypt to Angola, the Soviets were the obvious alternative to the colonizers, and their influence increased, much to the alarm of the western governments and the apartheid government. This problem was, if anything, especially acute in southern Africa, and I'll discuss this further below. But the apartheid government was regarded as perhaps the bulwark against full Communist control of southern Africa (reminder: apartheid South Africa was also, at this time, the colonial overlord of what is today Namibia, through which it bordered Angola), especially as the primary opposition to the apartheid government, the African National Congress, was socialistic and did associate with the USSR. For this reason, too, the western international community was willing to ignore apartheid.
And it cannot be said that apartheid South Africa didn't put its money where its mouth was. Throughout the Cold War period, they fought numerous proxy conflicts against Soviet, Chinese and Cuban-aligned rebel groups and states in southern Africa. Often, as in the case of Angola and Mozambique, this led to their working with pretty much anyone non-communist, including the forces of the colonizers (in this case, Portugal, though the South Africans continued to fight after the Portuguese dropped out when their fascist-holdover government, the Estado Novo, fell to the Carnation Revolution in 1974). The apartheid government also worked with anti-communist rebels such as UNITA and FNLA (Angola), and with the Rhodesians, who were fellow travelers in (a just slightly less rancid form of) apartheid. Side note: the Rhodesians were rebels in their own way; they unilaterally declared independence from the UK in 1965, and remained internationally unrecognized until after the fall of their apartheid government in 1980, when it was recognized as Zimbabwe Rhodesia, and soon thereafter became just Zimbabwe.
International support for apartheid South Africa began to dry up in the 1980s, when international sanctions movements began to gain steam, which resulted in a greatly slowing and even contracting economy (though the apartheid state's economic problems, including problems with growth, preceded sanctions and were greater than them; sanctions simply exacerbated these problems, and it is unlikely that sanctions would have had the effect they did if not for pre-existing problems; in this I refer to the manifest ineffectiveness of modern sanctions regimes against, for example, Putin-era Russia, North Korea, and Saddam-era Iraq as drivers of political change). As economic growth, sabotaged by sanctions, fell further, more and more sanctions rolled in, resulting in worse and worse economic performance. This eliminated one of the major planks of western support for the apartheid regime, and in many ways set the stage for its end.
At the same time the economy was stagnating, South Africa's military commitments in neighboring states were not decreasing, and were even increasing, due to the fall of the Rhodesians. As a result, the apartheid government was forced to devote more and more resources to defense, as a percentage of GDP, and victory was nowhere in sight. These commitments helped to exhaust the apartheid government financially, politically and militarily.
And it is here that I need to discuss the role of internal resistance to apartheid. There had always been internal resistance from blacks and other minorities, but for most of the apartheid period, armed resistance was quickly suppressed, and brutally. Nonviolent resistance took a little longer to catch on, but once it did, it became a major force and was a major part of encouraging sanctions from the international community. However, it did not hurt that, by about 1990, the exhaustion of the wars had loosened, a little, the apartheid government's stranglehold on military power, and there was at least some armed resistance during the immediate period prior to the end of apartheid, such that the ANC militias felt the need to entire into an armistice with the South African Defense Forces in 1990.
Political support for the apartheid government as a bulwark against communism also decreased during this period for a number of reasons. One, the Cold War was nearing its end and the many weaknesses that would eventually doom the USSR were increasingly obvious to the world, and as Gorbachev's reform attempts (glasnost, perestroika, and democratization) failed miserably. Two, members of the ANC, such as Nelson Mandela, were becoming heroes in the western press. This plank of support completely dried up when the Soviet Union's end became a foregone conclusion in 1990, which is also when public negotiations to end apartheid began to be held (though secret negotiations between the apartheid government and the ANC had begun three years earlier, in 1987). The negotiations would not end until 1993, and the process of ending apartheid would not be complete until the first multiracial elections in 1994. However, the apartheid laws were repealed in 1991.