How did the government justify apartheid?
I assume you are referring to the government of South Africa. South Africa had many reasons for supporting the policy of apartheid. First was the concept of racial superiority. The Europeans had believed for hundreds of years that their way of life was far superior to the way of life of the Africans. Europeans believed it was their duty to educate the Africans on how to live, on how to govern, and on how to conduct themselves. Unfortunately, this would go on forever if not challenged. The concept of inferior and superior is not given up easily. This is true mainly because it means giving up power, control, money, and possibly a way of life. Additionally, there was a belief among some Europeans that the races should be separated. Thus, in order to protect power, to maintain control, to follow religious doctrine, to maintain a way of life, and to influence finances, Apartheid was not only justified, but implemented as the policy of the South African government for decades.
Apartheid (an Afrikaans word for “separateness”) was set up by the South African Apartheid government in 1948 and was legislated as law until 1994. Under apartheid, the rights and movements of the majority black inhabitants and non-white groups were curtailed and white minority rule was maintained. The way in which the South African government justified Apartheid to the international community was that it set up bantustans (black homelands) in which African people were “independent”. These ten homelands (Transkei, Ciskei, Bophuthatswana, Venda, Lebowa, Kwazulu, etc) were spread across South Africa and were created in order to separate the different tribes of South Africa in an endeavor to curtail and diminish any political and civil grouping. The Apartheid government insisted these homelands (bantustans) were independent states capable of governing themselves like those of Lesotho and Swaziland.
The government, any government, is established to maintain the status quo. In the case of South Africa, one is talking about a corporate security state which uses its media apparatus to disseminate propaganda and misinformation about the nature of society at the same time that it maintains a high level of ignorance among the population at large. It creates a double society in which limited progress is presumed to be the intention of government for everyone while it works in the opposite direction to maintain a segregated society for a 1% at the expense of everyone else. Apartheid is seen as a necessary condition for the continuous improvement of society, when in fact it is used to divide and conquer the mass population. Every 'modern' society is a house of cards and the control of race relations by any means in the name of a socialist progress is a mechanism to support the status quo.