The Gemara in Sukkah says that the sechach that one must use for his sukkah must be detached from the tree in order for it to be fit for use. The Gemara (Sukkah 11a) discusses what a person must do if one put branches on his sukkah before they were cut off from the tree. The Gemara concludes that branches must be detached from the tree and he then must shake them.
The Rif, when bringing this halacha (6a dafei haRif), says that the reason why one must shake the branches after they are cut is so that they should be made lishmah – for the sake of the mitzvah of sukkah. The Ran asks on the Rif that if we do not require that a sukkah or its sechach be made lishmah, why then must one shake the branches in order for the sukkah and sechach to have been made lishmah? The Ran concludes that the Rif is not to be taken literally and that one does not have to shake the branches with lishmah in mind; rather one only needs to shake them – and the sukkah is valid.
The Rambam, however, seems to believe that the Rif is to be taken literally, for when he writes this halacha in Hilchos Sukkah (5:12) the Rambam adds the same words as the Rif, namely that the reason that one must shake the branches after they are cut from the tree is so that they should be made lishmah for the sukkah. The Rambam would not have repeated the reason if he believed that it was not to be taken literally. But the Ran’s question then stands on the Rambam and his view of the Rif: Since we do not pasken that a sukkah must be made lishmah, why do the branches that were originally on the sukkah while they were attached to a tree need to be shaken lishmah after they are detached? We pasken in accordance with Beis Hillel that a sukkah needs only to be made for the sake of shade, not for the sake of the mitzvah. Why then does the Rambam require that these branches be shaken for the sake of the mitzvah?
Acharonim answer that indeed when one makes a sukkah and initially puts on kosher sechach he does not need to have in mind that it is lishmah, only that it will provide shade. However, when one has sechach that is unfit for use – for it is still attached to a tree – then in order to render that sechach fit for use (without removing them completely) one must shake them lishmah in order to use them for his sukkah. It would not suffice to merely shake them for the purpose of providing shade.
The reason for this is that by shaking the sechach one has not completely destroyed the sukkah; therefore it is still the same sukkah as it was prior to his cutting the branches off the tree. Since the original shade is still there it should be unfit for use. Shaking the sechach is not a new act of putting on new sechach; rather it is an act of making the sukkah. Only when one shakes them for the sake of the mitzvah can he render the sechach fit for use.
Tosafos, in Gittin 45b, quotes Rabbienu Tam’s view that women may not tie the lulav’s hadassim and aravos together; nor can they tie tzitzis. This is because since they are not obligated in the mitzvah, they cannot make the mitzvah. And since women are exempt from the mitzvos of lulav and tzitzis they may not make these mitzvos. Tosafos, in Gittin 45b, asks the following question on this opinion from the Gemara (Sukkah 8b) that says that women may build a sukkah: Since they are exempt from the mitzvah of sukkah they should not be allowed to make a sukkah – so why the discrepancy?
Acharonim answer that building a sukkah differs from the tying of tzitzis and a lulav. By tzitzis and lulav the tying is an integral part of the mitzvah and must be done lishmah. Therefore women cannot perform that part of the mitzvah since they are exempt from it. However, the building of the sukkah does not require that it should be built lishmah but rather it must only be built for the purpose of giving shade. The only restriction is that one may not use a sukkah that was made inadvertently. Such a process is not an action that requires lishmah – and women may partake in its performance.