It seems like a huge contradiction, they legalize casino's yet make online gaming sites illegal..reason being they simply can't force tax legislation from sites registered in other countries...and amost every gaming site is registered in another country or an indian reserve. So I guess those sites that want to legalize online gaming in the US have to agree to run their sites from the US, so they would pay taxes to the govt.
This is more or less dead on... It's extremely hypocritical, and far from the only thing in US law that is that way.
However, there are a few things you should understand about the US (most of this is for non-US readers)
There are 50 states in the US, and there are state laws and federal laws. The UIGEA is a federal law and it DOES NOT make online poker illegal. It does make it illegal for banks to knowingly transfer money to or from online gambling entities, which is virtually impossible to strictly enforce so all it effectively does is annoy everybody without stopping anything.
While things may be legal at the federal level, states may individually decide to outlaw something. Washington state and one or two others have made online poker explicitly illegal.
Prostitution might be a good example here... afaik there isn't any federal law outlawing it, however almost every state everywhere HAS outlawed it. About the only exception are certain parts of Nevada have legal brothels, and that's a state thing.
Ultimately thought.. it's all about power and money and not about morals in any way, shape or form. Anyone who says different is retarded or delusional (possibly both). It's not about morals because we are A-OK with lotteries, horse gambling, and various casinos (atlantic city, las vegas in particular). Most casinos in most other states only exist because the government can't tell a native American Indian tribe that they can't run one, so most do.
Politicians support these measures to keep getting votes from puritanical, religious right types (which have a ton of influence here...they are how Bush got elected twice). Lotteries usually pass with a "it's for the children" rallying cry (aka we will spend the proceeds on education... of course half the time they just shift money that was going to education to something else as soon as lottery money shows up so it has minimal impact on education anyway). As soon as they figure out a way to effectively tax poker, it will become legal though. Money usually trumps keeping the Right happy ultimately.