First, remember that customs is for goods. Checks of passport and visas is usually called passport control or immigration.
It is always the case that you have to go through passport control in the US, and I believe there are a few other countries which do it as well: there is no sterile airside airport transit at all, everyone has to go through passport control, reclaim luggage, go through customs, and drop luggage for the next flight, even if checked through.
It is also the case in some airports which do not have sterile airside transit (usually smaller airports, but that includes quite busy airports like Luton in London for example, and a number of other airports used mostly by LCCs). But in those cases, airlines will usually not sell you connecting flights through those airports (so they are self-transfers).
Of course if you have a self-transfer and checked luggage you will need to go through passport control as well to retrieve your luggage and then go to departures to check in.
If you have multiple connections within the same country (or group of countries like the Schengen Area), it’s also a requirement to go through passport control at the first airport in the country/area and then through exit passport control at the last one.
This also applies when your arrival or departure airport is in the same country/area as the connection airport (and the other end of the itinerary isn’t). For instance if you fly JFK-FRA-ZRH you will go through checks in FRA, not ZRH (at least in theory — you could be subject to additional checks in ZRH even though you arrive from another Schengen Area country).
Same thing if you have to switch airports. Sometimes also if you have to switch terminals (may depend on the exact combination of terminals in some places).
In some airports, some transit passengers may also be isolated (right at the gate) and have their passports taken away during international transits. There could also be checks to ensure that they have an airside transit visa right at the gate, in situations which require one.
There’s also the case of US pre-clearance: if you fly to the US through an airport which has pre-clearance you will go through (US) passport control at that point (but you will then arrive in the US as a domestic flight without any checks there).
Without the details of the itinerary (origin and destination countries, all connection airports, the airlines involved, and whether this was a real connection or a self-transfer) it is difficult to say whether this was perfectly normal or if something went wrong, but I suspect the former rather than the latter. And if so, then, no, there’s no reason to complain.