Here's one reason: In most countries people have an official sex, shown on official documents. (That will change one day: sex should be treated as potentially confidential medical data.) However, most countries have never had an official concept of "race". So if an insurer asked people for their race they could answer whatever gives them the lowest premium and they could not be accused of lying.