I'll probably start a fight here but I'd suggest that LEAVE won due to a campaign of fear riding on the back of increasing racist sentiment.
I think you are spot on, however overall there are dozens of countries that have more racist sentiment than the UK.