Congressional Authorization Quotes
In subsequent years military officers got around this restriction by privately expressing confidential opinions to members of Congress and the press. In the Iraq war for example most senior military officers felt that more troops were needed in Iraq. However, since the President decided on the final troop count only one official, the Army Chief of Staff, has publicly expressed the view that it was insufficient. He was retired early. The stricture still stands.
It is this law that prohibits the military from enforcing laws ranging from immigration violations to illicit drug interdiction. This type of prohibition is quite rare in the history of nations and many credit it with making sure that the military is always under the control of the civilian government. Coups detat in the world often begin by a military unit arresting the civilian officials on the grounds that they violated some law.
Raiders operating out of the Barbary Coast typically would attack any American shipping seizing the goods and the ship and ransoming the crew or passengers or selling them as slaves. English and French governments had paid the Tripoli tribute for safe passage. The President and Congress sent American ships to in effect blockade the corsairs in their harbors.