I don't have a "legal" answer. But, I figure it is the point in the trip where I'd have to formally "re-enter" the country. In US airports, you can always walk out of the terminal, even dedicated "international" terminals without going through immigration. Although we have an exit procedure for foreign passport holders, we don't have them secured. Many countries have a formal exit procedure - that is the point I figure I've "left the country" because I'd have to re-enter to go outside.