This is a pun on 'rhyme'. The common saying is "punisment should fit the crime' meaning you should be punished in relation to the crime that was committed. Although 'rhyme' is used here because it rhymes with crime and sometimes poets rhyme
When the bad poet stood in front of the judge , the judge thought the punishment should fit the rhyme .