The polymorphed otyugh gives the party a chance to fight a less lethal ogre
Encounter M4 of Life's Bazaar (the first adventure in the Shackled City adventure path) has this to say about Xukasus the polymorphed otyugh:
Xukasus retains his otyugh statistics (including ability scores), his darkvision, and his scent special quality, but loses his improved grab, constrict, and disease special attacks. [...] Xukasus retains his ogre form if slain. A successful dispel magic (DC 20) returns Xukasus to his true form.
When compared to a regular ogre, Xukasus is a little slower, with a higher AC, a different weapon, and the scent ability, but by far the most important difference is Xukasus' 11 STR compared to the 21 STR of a regular ogre. This means that's Xukasus' main attack has a +3 to hit and deals 2d6 (average 7) damage compared to an ogre's +8 to hit that deals 2d8+7 (average 16) damage.
If the party finds the secret door to the elevator in Jzadirune, it's possible they can descend into the Malachite Fortress at level 1. A regular ogre would knock most first level characters unconscious with a single blow and has a reasonable chance of killing them outright. Xukasus represents a much less lethal challenge by comparison, which is likely intended since he's the first combat in the fortress, not the final boss.
Since the only way to reveal Xukasus' otyugh form is through dispel magic, which a first or second level party is very unlikely to have access to, the polymorph seems to solely exist to justify to the DM the weaker ogre.
Converting this encounter to 5e, a regular ogre would likely still pose a more lethal challenge than intended, and something with the stats of a bugbear may be closer to the level of challenge the original designer intended.