Yes you do have to pass immigration, but this was the case 30 years ago or more, even if you had a short transit time, say to go from Miami to one of the Caribbean Islands. In other countries, you sit in a transit lounge and are technically not in said country, but
afaik, the US always had this policy of insisting transit passengers to go in and then out of immigration when not actually entering the country.