Depends on where you are. I've done my share of bartending. When I lived in Wisconsin, it was pretty much required that I drink behind the bar. All over the town I lived in, every bar did this bizarre dice game where the last person in had to buy a round. You'd find anywhere from two or three, on upwards of 20 people playing. Winner (loser) buys a round. I never understood the game, but as a bartender, I had to play. If you didn't play with the customers, and drink with the customers, you would not have any customers.
When I was living in New Mexico, it was totally illegal to drink behind the bar. New Mexico is the only place I have ever lived where I had to take a class from the state, pay a licensing fee, and be licensed in order to be a bartender. Get caught drinking behind the bar by alcohol enforcement, and you lose your license. You are unemployable. Needless to say, all of my drinking there was done AFTER my shifts.
Even when I could drink behind the bar, I never went overboard with it. As somebody else said, working in small joints your often not only the bartender, but also security. A drunk bouncer is ALWAYS a bad idea. Always.
Here in Cleveland, it's not illegal to drink behind the bar, but most of the better owners discourage it, or forbid it. Some of the seedier dives you'll almost always find a hammered bartender. It's no fun. Customers get neglected, the money never comes out right, and tons of other issues. I've noticed these are usually the places the have the lowest end clientele, do the least business, and are usually in business the shortest amount of time.