They may get that drilled into their skulls, but I think it's more that they just don't want their boss to yell at them.
No police officer arrests a DUI and says "but I'm just doing my job." It's only when the other person (the traveler in this case) has an entirely legitimate reason to resist them that "I'm just doing my job" comes out, with an implied threat that the authority they're appealing to (that they themselves don't have) will come down on everyone involved, and they don't want that.
Also, they don't have any personal liability for anything that goes wrong in this process, except perhaps that the company they work for will lose the contract (unlikely here). Again, "boss will yell at me."
These people are better thought of as clerks than cops. And yes, they can inconvenience you, but that's not the same thing as compliance.
You (the notional you) aren't even from here. If you say no, you've identified yourself as a potential threat, and can just sit in a room by yourself for as long as it takes to put you on the next flight back to wherever you came from, at your expense. And you probably won't be allowed to return.
If you're a citizen and say no, they might confiscate the device, and might make you wait around long enough to miss your connecting flight (and maybe even the next couple, if they're feeling particularly peevish), but that's about all they can do.