There are a lot of things which are illegal. In Washington state, it's illegal to videotape someone without their consent. Across the world, it's illegal to have sex with someone without their consent. (Here's a hint: that's called rape.) It is illegal to take an item from someone without their consent (theft), and it is illegal to enter someone's property without their consent (trespassing). Of course, these actions all become legal if the person in question (in their right mind, of course) says you can, whether verbally, via writing, or otherwise.
But wait! What about stores? I know they have security cameras that tape me whenever I go in! Aren't those illegal?
This is where implied consent comes in. Privately owned businesses essentially host you while you're in their store. They have rules, and can expel you for not following them, like any household. (Unlike most households, stores have security guards to carry you away, however.) Some rules might be, "No stealing", or "No killing", and you have to agree with these before you enter. It's doubtful you've ever been approached by an associate of the store and asked to agree to these things, and it would be a pain to make everyone verbally agree to it before entering. The consent to follow those rules is implied, and it's implied that you give consent to cameras to film you while you're inside the store, or on the premises.
Now, life has risks. If I step outside, I could be struck by lightning, drowned by a rogue tidal wave, or eaten by a starving dinosaur. Again, you don't have to sign any sort of liability form before you exit your house; the consent to risking these dangers are all implied. Of course, should someone take action and harm you, that's against the law. Following that train of thought, it's implied one does not consent to being stabbed, or robbed.
On to gambling. When I talk about gambling, I'm not talking about horse races, or casinos, or those scratch card games. I'm talking about "social gambling", as it's called under the law. "Social gambling" is essentially getting together with friends (usually in the privacy of one's home), pulling out a deck of cards, or whathaveyou, and putting some cash at stake. That sort of gambling is illegal in 22 states, fined in another, and regulated to $10 stake/person in another. (Though how they regulate that is beyond me, as well as how states uphold such laws in the first place.)
Why is this illegal? When you decide to play some poker with friends, you willingly give up the stake, ante, or bet. Nobody is pointing a gun to your head (one should hope); you're there of your own volition, and if you lose money, it was your choice of your own will to give it up. The government has no laws against throwing money off a cliff (Laws concerning defacing/destroying currency only involve intent for fraud.), so why have laws against social gambling?
The government's a busybody. I imagine I sound quite snooty saying (typing?) this, but it's none of the government's business what you do with your money, so long as it does not harm anyone else, or their property. The only argument for the regulation/illegality of gambling is its addictive qualities. This raises a few more questions. First, is it the government's position to make sure you don't do stupid things which harms only you? Everybody gambling in a social environment has already agreed to the circumstances - it is the government's place to run in full throttle and yell "SCREW YOU I'M NOT IMPACTED BY THIS AND ALL OF YOU CONSENT BUT YOU CAN'T DO IT ANYWAYS!" (Alright, maybe a family could get hurt, but one would think social gambling among friends wouldn't go that far. The family bit is still a legitimate argument.) Second, why is World of Warcraft legal?
Interestingly (unlike the rest of the topics I'll discuss this week), the Christian bible has nothing to say about gambling, or at least not directly.