When my Cali was in Service Dog school they taught her to not take food (treat a or any food) from anyone but me (and only from the left hand as well, but that is another story). I understand other Service Dog Schools also teach that.
I think it is strictly about the safety of the pup
I would be devistated if some kook fed my dog poison or some other dreadful thing.