Sounds like a great idea doesn't it? Well, yes... and, no.
Lets start with the "no"
The real basic here is that casinos love drunk people - the inebriated don't care so much about losing money and are far more likely to take risks. Get people drunk enough and they may even forget how this works and fold hands that would have been winners (trust me, I have seen it happen).
At the very least drunk people tend to keep gambling till there are no chips left; they don't stop as they "made back dinner" or "lost 10 times what that drink would have cost"
And there is the real point. If you were going to gamble with money you could afford to lose, then a free drink to go with that is a great idea. Gambling so that you can get a "free drink" is definitely not a good idea
What about the "yes"?
Sometimes gambling so that you can get a free drink is a good idea! I know, completely contradicted myself; there is a reason for it (although it is a gamble!!)
Quite a lot of the upmarket casinos (most of them on the strip now, it seems) charge ridiculous money for a domestic beer at the bar (talking $18 for 2 Budweiser bottles).
Now - the majority of bars have video poker in them and you should be comped for playing these...*
*side note - Vegas changes a lot and each casino seems to have its own rules. My biggest piece of advice here is to ask if you are not sure and do this before you start gambling any money in the machine; put your $20 in, ask and, if they say no, take your money back out.
They may well tell you you must "bet max" to get comped or another point around minimum bets which is standard and to be expected.
If you are fussy about what you drink you may also want to ask what they will comp as it may only be domestic beers; if you don't ask you don't get.
...and Video Poker is, allegedly, one of the better games in terms of house edge (see About.com where it talks about how to reduce the house edge - lots of other useful bits around gambling there too).
So play slowly, chat as you would have done, people watch as you would have done but do keep playing until you have at least ordered 2 drinks.
If you lose it all, its just what it would have cost you to buy it anyway (more or less depending on what you got comped) and there is every chance you will come out on top.
It makes sitting at the bar just that little bit more interesting and , besides, you are in Vegas!