This is funny because kids are taught a little rhyme to help remember this English spelling rule: the letter “i” comes before the letter “e” but after the letter “c” it is the opposite. The rhyme is a “I before E except after C”.
For example: “believe” and “friend” have the i before the e, whereas “receive” and “ceiling” have the e before the i because it’s after c.
Actually, there are so many exceptions to this rule that it really doesn’t help a whole lot! But it’s something that people remember, so it is funny in a joke like this.
For example: “foreign” and “science” both break the rule.
Learn more about this English spelling rule and the exceptions on Wikipedia: https://en.wikipedia.org/wiki/I_before_E_except_after_C