There is so much in their music that goes back thousands of years.They faced criticism from Indian musicians, but "Norwegian Wood" was really one of the first songs to introduce the idea of world music to the popular scene. The Beatles were famous allies of Asian religion and managed to celebrate Indian culture without exploiting it.
Many different groups of people like the Beatles and their music as they Incorporated so much and shared many messages of love and peace that it would become a common ground between many different groups of people as they began to realize the similarities between the communities and eventually bringing an end to Apartheid.
The credit for ending apartheid should go almost exclusively to the activists and civilians in the South Africa who fought in brutal conditions for equality underneath the law. To a smaller extent, some international bodies who put continual pressure on the South African government to end apartheid. Pop stars such as the Beatles had minimal effect on the situation. Despite the fact that they were vocal about the issue, they were not particularly well versed in South African politics and where therefore incapable of stirring real change.
Ultimately, the Beatles were the popular music of the day. They did not have any real effect on society, other than being entertainment icons. The Lady GaGas and the Justin Beibers of today do not have any real effect on society. Apartheid was going to end anyways, regardless of what the Beatles did.