usa – How would the INS find out about a visa overstay?

I see all kinds of guidance on various travel resources about visa overstays, penalties, forgiveness, excemptions, blah, blah.

However, none of the resources that I have seen ever say how the INS would find out about an overstay. I mean they can make all kinds of threats about penalties, but it is moot if the INS never has any way to find out.

As far as I understand it a record is only created when a traveler ENTERS the United States, not when the traveler leaves. When the traveler leaves, they just get on the plane and leave. There is no customs, no immigration check, no nothing. So if there is no record being created of the departure, it would seem to be impossible for INS to ever know about, much less prove a visa overstay. Am I missing something here?