ISIS caused Brexit
Terrorist basics is to create fear. Sending refugees into Europe is a declared tactic. Camping enough of them at Calais put the fear into enough Britons to vote to leave the EU, to visually and physically cut the link.
I do not think Cameron thought of that, nor did his strategists. After all they were in their Think Tank. Splitting the EU as early as 2016 must have been a much quicker result than any strategist could have expected.