The USA doesn't recognise "transit" in the way it is seen by most other countries. Even if you're getting off one plane straight onto another you have to go through the full paraphernalia of Immigration and Customs. Furthermore you can't check your baggage through the States but have to collect it to take it through Customs with you. Quite absurd, but there it is. Buy a ticket to transit any European country and you get put into a secure Transit lounge between flight, you don't have to go through and formalities, and you don't see your checked baggage until you arrive at your final destination. This US nonsense is nothing to do with 9/11 - it existed before. But with the extra "checks" now done at US airports reckon on a very long time to clear formalities. "American" recently booked me from Belize to Miami, changing to a flight for Europe that left 2 1/2 hours later. "American" said that was plenty of time. But just getting to the front of the incredibly long line in Immigration actually took 5 hours. And then the officer was surly and officious.
The best advice on transitting the USA is "don't". Try to find another route. Cancun often provides a much better alternative.