Upvote:2
Immigration into the US is always at the first US airport you land at, same as almost every country in the world.
Think about it: The flight from New York to Los Angeles is domestic, mainly carrying domestic passengers who don't have to be immigration screened as they disembark in LA. There's be no secure way for authorities to pull the few international travelers arriving on a domestic flight aside for an immigration check.
Specific to the US, customs also happens at the first airport you land at, so you need to pick up your bags, carry them through customs, and then hand them back to the airline for further transportation. (This is in contrast to how it happens for arrivals into the EU, for example, where customs clearance is usually done at your final destination).