And it must be said the officer knew precisely what I was asking, and why, and knew in the manner he replied that he was acting in a grey area.
As he was polite I made it clear to him I had no problem with his behaviour at an individual level, as this decision was taken at a level above his.
And - give the Swiss their due here - EVERYONE was checked. Not just ethnic minorities. So that's fair at least.