You experienced USA Preclearance, where US Immigration and US Customs agents are deployed in some foreign countries; currently, fifteen non-US airports have US Preclearance facilities. You can read more about it on the US Customs and Border Protection Preclearance webpage.
US-bound flights with passengers who’ve cleared CBP preclearance are essentially "admitted" to the US before boarding the aircraft. Thus, flights arriving in the US from preclearance facilities are treated at US airports the same as flights originating within the US, and can deplane passengers and their luggage without further CBP examination or formalities.
Credit:stackoverflow.com‘
4 Mar, 2024
5 Mar, 2024