Alternative non-racist reasons amongst my Leave-voting friends were:
The polls all pointed to a Remain win, so he voted Leave to give Cameron an uncomfortably close victory. That really worked well, tactical voting in a binary referendum. I wouldn’t call him a racist, or particularly thick, but it ain’t clever wot he done.
Britain’s famers were apparently all forced by the EU to rip out thousands of kilometres* of hedgerow, so she voted Leave “for the farmers”.
(*Heh, just kidding, she said “miles” not kilometres.)
Another one who voted Leave was/is a thick racist, but also from a well-known fishing town in Devon, so voted “for the fishermen”.
My BIL, married to a German who didn’t have a vote, with two under-voting aged children who BEGGED him, as the only voter in the house, to vote Remain - he voted Leave to “stir things up, teach Cameron a lesson”.
Brilliant. Just brilliant.