The joke is a pun on the phrase 'out of shape'.  Being out of shape means that that person needs to exercise and eat better to remain healthy.  Geometry is a math class about shapes.
I wondered why my geometry class was always tired . They were all out of shape .