Although not explicitly illegal, asking these kind of questions in another country would open up the risk of being sued for discrimination in case a person belonging to a minority wouldnt get the job.
Ive always wondered about the US' obsession with racial heritage (I thought that got settled in 1945) etc.