Because it's specifically a spectator sports betting scheme, racing is a sport. When you race a chocobo you don't hand over your 10 mgp and hope for the best, you are (mostly) in control of the outcome of that race, you are paying to participate in an interactive event where everybody wins. You can not lose mgp via chocobo racing you just earn a smaller bonus on top of your initial investment as you finish lower in the final positions therefor you are not betting as you can not lose mgp via participating.

The scratchers and lotteries are based on a very legal model that is played the world over which is also normally backed by the government of a country in one way or another so there are no implications regarding this for SE.

Triple triad follows a similar betting scheme to card games like poker which again is legal in all countries that SE provide a service to.

GATES I can't comment on as my knowledge of the law does not cover this kind of interaction between player and house.