People do varying degrees of weird things incarcerated.
Cross dress, become someone's boyfriend, etc. But we won't talk about those weird things.
Throwing one's feces around is not unheard of or is, unfortunately, even that uncommon.
Feces is the cause of a lot of diseases. While you think that it isn't "uncommon" (a fellow con would probably beat his cellmate senseless if he found it on the floor of their cell), correction officers shouldn't have to put up with it.
An angry person in a prison can resort to such antics.
So many of these prison inmates have been angry their entire lives. Abused as children, broken homes, drugs, their dysfunctional childhood is a reflection of their anger that they have in prison.
Prison guards are made aware of these things in their training- they know what they signed up for.
And the same can be said for police officers; they are all without excuse when they do crooked things.
Your are correct, these people are professionals and should be above such things. When they are tried (not by an internet forum, but by a jury of their peers) and convicted, they'll pay the price for their crimes.