Online gambling is not actually banned
by legislation. There's just this fuzzy legal gray area where state restrictions/bans are enforced by the federal government, so if gambling sites step a toe out of line they get the ax.
Money is one reason, but ultimately the actual reason is morality. Most politicians are rusty, aging, conservative bureaucrats, and dislike gambling -- plus many demographics on both sides of the aisle dislike gambling too, and many others don't care. Gambling-rights movements are really only strong in socially liberal or fiscally conservative states out West (most notably Nevada and California