The children of Israel again did that which was evil in the sight of Yahweh: and Yahweh strengthened Eglon the king of Moab against Israel, because they had done that which was evil in the sight of Yahweh.
The writer may have recorded this last disgusting detail to draw a parallel with the unclean Moabites’ departure from the land following Ehud’s victory. Notice the cool way Ehud behaved after he slew the king in his cool room (Judges 3:23). Perhaps it was the odor of Eglon’s excrement as well as the locked doors that led the servants to conclude that the king was relieving himself (Judges 3:24).