Another factor is the sluggish global economy. People are looking at that as a failure of globalization. Rightly or wrongly.
A random thought. Why should Facebook, Twitter, Apple, Google, Microsoft, NetFlix, Amazon, Tesla, all be separate companies? They could get together and form, FTAGMNFAT Inc. They would share resources, IP, offices, etc. etc. Stop fighting with each other...
I guess one reason we feel this is stupid(?) is that we believe that competition encourages positive outcomes.
So how is this different when it comes to countries? Why is it inherently an economic advantage for the UK to be part of a bigger block? We consider small startups to be nimble and adaptive and big companies to be the opposite.
On one hand the anti-immigrant feelings reminds me of much darker days. On the other it seems chaos would reign if all world borders were abolished tomorrow. As an individual I like the idea of being able to live anywhere on this planet but I'm not sure how that idea scales especially given more and more people and seemingly less and less resources.