Searches, in Germany, generally demand cause. I have no idea what laws govern searches in Switzerland.
The part with citizens vs non-citizens was mainly about borders. The US is known to be incredibly mean to non-citizens, going so far as to require a visum for transit, whereas Schengen only requires a transit visum for citizens of a small number of states.
It seems strange that Swiss police did a random search. Anyway, it seems that the US police also does random searches—at train stations for example.