DENIAL OF ENTRY INFORMATION
First off let's get out of the way the myth that a lot of people are denied entry. Actually very few people are denied entry on any given day. You have to realize that close to NINETY THOUSAND people stamp in to thailand every day at all the entry points combined. It's actually way more with local border traffic but that's about the number of "foreigners" who stamp in every day.
Now when someone is denied entry, they are NOT deported (you have to stamp in to thailand to get deported and being denied entry means you can't stamp in). They are also not banned from thailand, they are just not allowed to stamp IN to the country at that entry point. Also when someone is denied entry IF they have a valid visa in their passport that visa is still good (immigration officers cannot cancel a valid visa issued by a thai consulate when denying someone entry).
Now I know this will shock people BUT no matter what the immigration officer says about someone being in thailand too long on visa exempt or tourist visa entries there is NO OFFICIAL rule that limits it at all. <- meaning that is NOT a valid reason to deny someone entry to the country (no matter what you're told to your face)...
There are 11 reasons that a person can be denied entry and ONLY those 11 reasons. Surprisingly none of those is "having spent too much time in thailand". :O There USED to be a rule that limited visa exempt entries to no more than three 30 day entries in a 6 month period. That rule was rescinded AGES ago but it is the basis that immigrations uses to parrot out the "no more than 180 days in a year" fake rule. Be that as it may. . .
Once it is determined by the immigration officers that a person will be denied entry it is 100% up to the air carrier that brought them here to dictate where they go back to. Some carriers allow you to go right back where you came from, some allow you to go anywhere they fly and some make you use a flag carrier (an airline from your country that can't refuse you traveling) and go back to the country your passport comes from . One last time, it is totally up to the air line where you go and to a lesser extent how fast you can leave.
Believe it or not but most people who are denied entry when flying in end up going to a neighboring country and entering by land without any issues.
The image shows the 11 reasons listed in Section 12 of the Immigration Act why someone can be denied entry. Keep in mind even if they tell you you're being denied entry because you spend too much time in thailand in year you will get a denial based on reason 2, 3 or 9 <- those are the most common denial reasons.
Sorry this was oh-so long, hopefully it was of marginal value
TLDR : Answer Summary
This post dispels myths about the frequent denial of entry into Thailand and outlines the specific 11 reasons under Thai Immigration Law that can lead to such a denial. It clarifies that having a valid visa does not get canceled upon denial of entry, and the airlines play a critical role in deciding where to return denied travelers. The author also emphasizes that immigration officers cannot deny entry based on perceived overstay concerns, as there is no official limit on such entries.