The Mishnah at the beginning of the second perek of Sukkah (20b) relates an incident involving Tevi, Rabban Gamliel's slave. The Chachamim gathered in Rabban Gamliel's sukkah, while Tevi slept beneath the bed. Rabban Gamliel said to them: Did you see my slave Tevi? He is a talmid chacham, and he knows that a slave is exempt from the mitzvah of sukkah; that is why he sleeps under the bed. From Rabban Gamliel's statement, the Chachamim learned that one does not fulfill the mitzvah of sukkah while under a bed. However, his words seem to imply that there was a chiddush in a slave's exemption from sukkah, and that Tevi's awareness of this showed his knowledge of halachah. Why is this a chiddush? Every slave knows that he is exempt from mitzvos from which women are exempt, such as wearing tefillin and reciting Kerias Shema. Since it is well known that women are exempt from sukkah, every slave should have known that he is exempt as well.
We can offer the following lomdisheh answer: Although women and slaves are generally exempt from time-bound mitzvos, the Gemara (Sukkah 28a) still requires a specific source to exempt women from sukkah. This is learned from the extra letter hei in the word האזרח—the native, which limits the obligation and excludes women. The Gemara gives two reasons why the general exemption of women from time-bound mitzvos is insufficient here. Abaye explains that we might have thought the pasuk תשבו, which implies כעין תדורו dwelling as one normally lives, teaches that just as ordinary dwelling involves a man and his wife, the mitzvah of sukkah should include both men and women. Rava explains that we might have learned from the gezeirah shaveh of טו' טו' from Pesach that just as women are obligated to eat matzah, so too they should be obligated in sukkah. The Mishnah L'melech writes that slaves are exempt from time-bound mitzvos just as women are. However, when women are exempt because of a specific gezeiras hakasuv, that exemption does not automatically apply to slaves. This explains why women's exemption from sukkah did not make it obvious that slaves are exempt as well. Still, this approach would require assuming that other slaves knew the Mishnah L'melech's principle, while only Tevi understood why it did not obligate slaves in sukkah.
The sefer Berachah Mishuleshes raises this question and answers that although women are exempt, they commonly ate in the sukkah together with the men. Most slaves, seeing women eat there, assumed that women were obligated and that they themselves were as well. Tevi was a talmid chacham because he understood that women ate in the sukkah only to join the men, not because they were obligated; therefore, his own exemption remained clear. There is a lesson here as well. Simple people often do not analyze what they see; they merely imitate others without considering why those people act as they do, or whether they themselves should do the same. To serve Hashem properly, we cannot simply copy others. We must reflect on why they act that way and then consider whether their conduct is appropriate for us. This is part of the avodah of Sukkos. The pasuk says: למען ידעו דורותיכם—so that your generations will know. The Bach maintains that one must have kavanah for the lesson of the sukkah in order to fulfill the mitzvah. This teaches that a person should not merely act, but should think about why he is acting. There is also a deeper message in the halachah that slaves are exempt from sukkah. A person who does not think, strive, and overcome his nature remains enslaved to his passions, with his actions guided by self-interest. The deeper meaning of living in a sukkah is to abandon self-centered pursuits and enter a life centered on closeness to Hashem. This idea is expressed in Chazal's metaphor (Sukkah 28b) of a servant who comes to pour wine for his master. One who is enslaved to self-centeredness cannot attain closeness to Hashem. To truly fulfill the mitzvah of sukkah, we must first rise above our natural enslavement to our interests and passions.