You establish yourself as a regular, a friendly person, and a good tipper, then you start to get free drinks. Now you are getting free drinks every time you come in (probably one out of 3 or 4 rounds). You should still tip generously, but you're coming out ahead.
Let's say I buy 3 $6 beers. If I paid full price, I'd tip $3, for a total of $21. If the bartender buys me a round, I'd tip a few bucks extra ($5), for a total of $17. I saved $4. Now multiply that out by how much you actually buy and the number of people you're with, plus add in some comped food. You're tipping more than the normal person, but the total is still a lot less than if you'd paid for everything you consumed.
I've only ever been a regular at one place, and it's because my wife and I came in the same day every week for their all night happy hour. We only went there once a week, but since we developed a relationship with the bartender, we got treated really well. You don't have to go out every night.