Show me a country that does not reserve to itself the right to carry out border inspections (and if you're going to mention the EU, that change is only recent and by treaty, effectively making Europe into a single country of multiple states). As long as there have been borders there have been smugglers, and as long as there have been smugglers there have been customs agents. This is especially true of the US, because before the 16th amendment and the creation of income tax, import duties were a primary source of government revenue.