Looking at a map of South Africa, these two small enclaves stick out. How come they exist separate from South Africa (or, in Swaziland's case, possibly Mozambique)?
I've commented (as have others) on this before, including here specifically but also elsewhere. The short point is that the British at various times tried (or sought to encourage) the absorption of Basutoland (Lesotho) and Swaziland protectorates into a greater South Africa, as they did for Bechuanaland proper (today Botswana), Namibia after WWI, and the Company Rhodesias (today Zimbabwe and Zambia), along with a bit of dreaming about buying Mozambique and adding Malawi at certain times.
These efforts failed in large part because the people in those areas--usually defined by kingdoms, as protectorates were at the time--emphatically did not want to be absorbed into South Africa's settler-ruled apparatus, either before or after Union in 1910. That was a point on which leadership and people generally agreed--rule by white settler governments was unacceptable. The attempt to do so with Basutoland to the Cape Colony (1871-1884) ended in war between the House of Moshoeshoe and the Cape settler government and a reversion to Protectorate status directly under Britain. Basically, none of them wanted to be ruled by the settlers, because that tended to lead to taxation, disarmament, and land theft. Swaziland in fact had to be 'recreated' out of the post-SA-War Transvaal Colony at the time of the latter's reversion to local rule by an Afrikaner regime in 1906/7 precisely to forestall a possible rising as had happened in kwaZulu in 1904/5. While they kept Zululand as part of Natal after appending it in 1897--and there are complex reasons why this remained acceptable to certain parties within kwaZulu, which Michael Mahoney mentions in his The Other Zulus about the emergence of modern Zulu identity--they did not keep Swaziland as part of the Transvaal. Whenever re-attachment made it past the stage of idle speculation it produced immediate protests and threats of total rebellion if such were attempted. As time went on and nationalist Afrikaner elements gained more strength within South Africa proper, it became less and less likely, and was effectively dead by 1948--[edit: and once South Africa became a republic outside the Commonwealth in 1961 and (Southern) Rhodesia declared independence in 1965, Britain began to accelerate its devolution of nationhood in the remaining High Commission territories (as they were known). ]
Ronald Hyam's old The Failure of South African Expansion 1905-1948 and Martin Chanock's Unconsummated Union (both over 40 years old now!) are still key reads on the political maneuvering, and there is some discussion of it in the second volume of the Cambridge History of South Africa edited by Robert Ross, Anne Kelk Mager, and Bill Nasson (2011). If there's anything good that's newer, however, I'm all ears.
[edit 2: forgot that some people don't know when Union happened. Sorry if this is stochastic; I'll clarify in any followups as I am able. I am busily writing in French today and it is making my brain hurt because my French really and truly sucks.]