This riddle plays on the double meaning of "12 months." On one hand, it refers to the literal number of months in a calendar year. On the other hand, "12 months" is a clever way of saying what the thief received as a consequence of their actions—essentially, a year in prison for their crime. The humor comes from the unexpected twist that stealing a calendar leads not just to a time measurement, but to a punishment that also involves time!