There is an important exception to this rule: if you fly to the U.S. from a preclearance airport, your luggage will typically be checked through to the final destination, and you won't have to collect it at your first U.S. stop.
At these airports, you clear U.S. customs and immigration in the country you are departing, rather than on arrival in the U.S., so the flight effectively operates as a U.S. domestic flight: you simply land in the U.S. and get off the plane, with no controls.
(You also don't have to collect the luggage that the pre-clearance airport itself, at least in all cases I'm aware of, because they have systems for associating the luggage with you and doing a customs check. In some places, for example, you may be shown the checked bag on a screen.)
Here is the complete list of pre-clearance airports. In brief, they include:
- All major airports in Canada
- A few major destinations in the Carribean
- Dublin and Shannon in Ireland
- Abu Dhabi
Flying via a pre-clearance airport is a good option to explore when available, because it tends to be a better experience. Not just because of the luggage, but also because immigration and customs in the preclearance location can be a lot less busy than in a major U.S. airport, and U.S. connections are easier: you land in a domestic terminal and then simply continue on to your onward domestic flight. We often choose Dublin for this reason when flying out of Europe.