To answer the question, as others have said, No, you generally can't do international-to-international transit in the U.S. without clearing entry immigration inspection and, thus, entering the United States. (There have existed a handful of narrow exceptions to this over the years, such as for passengers continuing on a fifth-freedom flight to another third country on the same aircraft, but these are relatively rare special cases.)
Why is the U.S. different from most other countries in this regard?
U.S. airports (generally) have no sterile (from an immigration standpoint) departures area. Anyone in the area from which flights depart can simply leave the airport without any sort of checkpoint whatsoever. The reason for this is that domestic-to-international connecting passengers are far more common in the U.S. than international-to-international ones. This is mostly because of how large the U.S. is (by both geography and population) and how far from other countries most of it is.
For domestic-to-international connections, the U.S. setup is actually much more efficient. You can walk off of a domestic flight within the U.S. and walk right onto a departing international flight without going through any sort of checkpoint whatsoever (immigration, customs, security, or otherwise.) Indeed, domestic and international flights frequently depart from the exact same gates. There is no exit immigration control in the U.S. You just show your passport as you're boarding the departing flight and the airline sends the manifest to immigration. This is great for domestic-to-international connections, making them very easy for passengers. It's also great for departing passengers in general, as they can access all of the restaurants, lounges, shops, etc. in the terminal regardless of whether their flight is domestic or international.
However, the fact that domestic flights arrive and depart from the same area that international flights leave from means that that area is necessarily inside the country from an immigration standpoint, not outside it like in countries that have exit immigration control and sterile international departures halls. Thus, you have to have already been legally admitted to the U.S. to access that area.
Unfortunately, countries essentially have a choice of inconveniencing domestic-to-international passengers or inconveniencing international-to-international passengers. The large international airports in most countries choose the former because most countries are much smaller than the U.S. and/or are located much more closely to other populous countries than the U.S., thus have a much larger share of international-to-international connecting passengers vs. domestic-to-international ones. However, the situation in the U.S. is quite the opposite with far more domestic-to-international passengers than international-to-international ones, so the opposite choice is made.
Additional Benefit: Preclearance Facilities
As a side note, the setup in the U.S. also enables a convenient feature for passengers flying to the U.S.: immigration pre-clearance facilities located in other countries. Most major airports in Canada and several other airports around the world that have a significant number of flights to the U.S. have U.S. immigration facilities on-site, allowing passengers departing on flights to the U.S. to clear U.S. immigration control before boarding. Their flights then arrive in the U.S. as if they were domestic flights, allowing passengers to immediately board other flights or exit the airport with no further immigration, customs, or security controls.
Aside from passengers not having to stand around in more queues after arriving, this also has another very convenient benefit: airports with preclearance facilities can have flights to U.S. airports that don't have immigration control facilities at all or outside of the operating hours for those facilities, enabling non-stop flights between major airports in places like Canada and the Caribbean to small/medium market U.S. airports.
Such a program would not be possible if the flights might include passengers planning onward connections to a third country without authorization to enter the U.S. For example, an Algerian national without a U.S. visa couldn't fly from Toronto to Algiers via JFK on a precleared flight, since they would not be able to clear U.S. entry immigration in Toronto prior to boarding the flight.