"Gruel and unusual punishment" sounds like "cruel and unusual punishment" which is a phrase in common law that describes a punishment considered unacceptable due to the pain of the punishment being excessive and not matching the crime committed. Gruel is a type of food consisting of oats, wheat, or rye that has a lot of liquid. Gruel is a lot like soup because they both have a high water content. This joke is playing on "gruel and unusual punishment" because it sounds like "cruel and unusual punishment".
The soup was so bad it was gruel and unusual punishment .