Most Brits I know were under the impression that it would stop or stem the flow of immigrants. They pulled the only lever they were given and it didn't work.
What's especially stupid is doing that in the era which we are now entering where countries will be competing for how many immigrants - almost without regard for quality - they can attract - in a world of rapidly shrinking birthrates.
I don't see why this is being downvoted, it's an accurate description of what happened.
The funny thing is, even at the time it was clear that immigration would not decrease as a result of Brexit. Farage repeatedly stressed that it would open the door to greater immigration from the Commonwealth. People projected their own desire for lowered immigration onto the vote because, as you said, it's the only lever they were given.