Barfly
Overview
 
Originally, barfly literally may have referred to the ubiquitous vinegar fly Drosophila melanogaster
Drosophila melanogaster
Drosophila melanogaster is a species of Diptera, or the order of flies, in the family Drosophilidae. The species is known generally as the common fruit fly or vinegar fly. Starting from Charles W...

, commonly attracted to alcohol and hence an expected visitor to drinking establishments. It has been said that this small fly is trapped in liquor bottles not properly sealed.

The above is anecdotal. The etymology of barfly probably lies in the archetypal behaviour of most flies
Fly
True flies are insects of the order Diptera . They possess a pair of wings on the mesothorax and a pair of halteres, derived from the hind wings, on the metathorax...

 being strongly attracted to some much preferred destination.
 
x
OK