Upvote:4
As an addition to @Willeke's answer, there's a more generic question of "how do overstayers get caught". And the real answer is that a lot of times they aren't caught. Tens of millions of people around the world are in dubious immigration status and no authority is capable of identifying them all. Even China has illegal immigrants despite their extensive surveillance capacities. In which situations do immigration authorities end up finding overstayers then?
And finally... some might never get caught. I'm sure there's millions of people who entered the US (perhaps not even via an official inspection point), stayed there for a few years, went back and CBP is still none the wiser. Just like there's people who got away with theft, tax evasion, sale of illegal narcotics, smuggling of goods, etc. But you'll still be better off if you follow all the immigration rules, even if there's a chance you could get away with it.
Upvote:10
Yes you miss something. The airline has to inform the authorities that you are on the plane and leaving.
If you leave via a land border or by boat your departure may also be recorded, if not in all cases.
If there is no record of you leaving, they may assume you are still in the country.
It has happened to many people that they tried to enter the USA or to get a visa or ESTA and were told they had overstayed while they had left but that record got lost.