Why don't US Customs and Border Protection do 100% border checks?
As others have mentioned, there is CBP preclearance operating at a number of foreign points of departure, and there is intent to expand such operations to cover more airports. But in addition to this, it seems that the US requires local authorities (airline staff, I suppose) in airports without preclearance facilities to conduct an additional inspection of departing passengers (beyond simply checking formal requirements, such as the possession of appropriate passports and visas or ESTA entries). For all I know, it may not be a formal requirement, but something that airlines do because they know that they would be penalized for each inadmissible passenger they bring to the US. If you have ever boarded a US-bound plane in a European airport, you may have been "interrogated" by such local staff about your travel plans, employment, etc. while you are waiting in front of a boarding gate. This is not done to everyone, but I suppose there are some formal criteria used to pick passengers for this additional "interview", based on their nationality, the type of tickets they hold etc. I am not sure what the decision-making process is: whether the airline can decide not to board someone in possession of necessary documents simply because they feel the pax won't be admitted to the US, or whether they have a way to contact a US embassy or CBP in such cases. But there certainly have been reports of the US embassy personnel occasionally appearing at an airport and announcing that a passenger's ESTA (visa waiver) authorization has been revoked: British Muslims Say They Are Being Refused Entry To The US P.S. Jay McKinnon's answer contains some factual information on such "informal" pre-check process (unlike my guesses). P.P.S. It is certainly possible to imagine some kind of political development in the US in which the Congress decides that all US-bound international flights or ferries have to be precleared by CBP inspectors based in foreign airports or sea ports. Passing of a (hypothetical) act like this will probably be followed by a decade of shifting deadlines and exemptions granted on case-by-case basis. (E.g., non-precleared flights from Asia or South America would be allowed to clear customs in Guam (Agaa) or Puerto Rico (San Juan), and then continue to the "heartland".) If not eventually repealed, a law like this will result in international travel to the US being concentrated in a comparatively small number of channels (i.e., flights from Canada, Ireland, and a few other places where more preclearance facilities are opened; I'd imagine there would be several in Latin America, Caribbean, the UK, and the Philippines, at the very least). Doing something like this would be pretty stupid of course, but not unprecedented. Somewhat similar situation existed, for example, when almost all travel between the West and P.R.China in the 1960s and early 1970s had to be done via Hong Kong; P.R.C. to R.O.C. (Taiwan) travel had to be channeled via Hong Kong until 2003.