I think it's the case with all transfers. If you're transferring between flights, in most airports, this is standard procedure. In my case, it was the same flight to JFK from SYD, via LAX. Though, I understand that it's US Homeland Security's guidelines that all incoming passengers clear customs...