for their job, including knowing the real purpose of the traveller. Now regarding the "shouting", I still have to see that! Is it upon presentation that the IO shout immediately? Sometimes, raising a voice doesn't mean shouting, maybe a sign of authority (sometimes). So if the traveler is "hiding" something, then the IO may have sensed it and become offensive.

I really don't know how many actual scene have you seen in the immigration counter but I really doubt the "animal" thing. There are might be some isolated cases but as I said, if the travel documents are complete and LEGITIMATE, then one an always file a formal complaint against these abusive IO's!