This is what I found online...
Do I need a visa when in transit in USA?
Travelers must apply for and receive ESTA even when transiting in the U.S. to a third country without a visa. You must apply for ESTA in any of the following cases: transit, transfer, or stopover (layover). ... This is necessary for purposes of the travelers' own safety as well as U.S. national security.