Well, cheating is illegal, and land-based casinos know very well how to protect themselves from cheaters.
Contrary to a popular belief, cheating in online casinos is not easy, either. Online casinos often include a clause stating that if they notice a pattern in your betting, they reserve the right to withhold your winnings.
Card counting is a different story, though. It requires you to be really attentive, and no one can accuse you of being so concentrated that you know the cards that have been dealt already.