Because he had problems.
Explanation: The joke is a pun that plays on the word “problems.” In mathematics, textbooks contain problems to solve, but the humor arises from the double meaning: the textbook is also personified as needing help with emotional or psychological issues, linking math and mental health in a funny way.