For though elites may find something vaguely horrifying about saying that you care more about people who are like you than you do about people who are culturally or geographically further away, the rest of the population is outraged by the never-stated corollary: that the elites running things feel no greater moral obligation to their fellow countrymen than they do to some random stranger in another country. And perhaps we can argue that this is the morally correct way to feel — but if it is truly the case, you can see why ordinary folks would be suspicious about allowing the elites to continue to exercise great power over their lives.
Actually it is not the morally correct way to feel. The rulers of a nation have a greater responsibility to the people they govern than to the people of another nation. That is not to say that they have no responsibility to foreigners, a President or Prime Minister can’t just go killing random foreigners because it conveniences his own voters, but his main duty is to the voters, not the foreigners.
The Western world is currently organised around the ideal that the rulers should be held accountable to the interests of the ruled through democratic checks. The rulers don’t like this: they would rather govern according to abstract ideas and not according to the concrete interests of their voters. Those ideals of course conveniently align with their own economic interests and let them escape accountability. The ruled sense this, and resent it.
I can’t say whether or not the Brexit is a good thing, time will tell, but it is entirely understandable.