Earlier quoted context omitted.
Those negotiations were not made on the basis of threatening to leave the EU. (edited for clarity)
British Euroskepticism has been a political force for decades and the risk of a Brexit has always been an implicit source of negotiating leverage for the UK.
According to this other polling [1], the appetite to do a full exit has not been as high, but still close to 50/50. I think in general people are doing a massive disservice to their own understanding when they try and take a minority "fringe racist" view and try to say that is the reason for all voters of Brexit, when reality is more complex and long-term.
(I say this not really having a horse in this race, never having even been to the UK and only having been to Europe a few times).
1. https://theconversation.com/polling-history-40-years-of-brit...