During the Sabbatical Year, no agricultural work can be done in Israel and fruits that grow on their own cannot be harvested in a commercial way, rather they are supposed to be left so that anyone can take them for their own use. Once picked they must be treated with care, as they have kedushat shevi’it – the holiness of the Sabbatical Year – they are supposed to be eaten or otherwise used in a normal way; they cannot be discarded in a degrading manner. Although it is forbidden to do business with fruit grown in the shemitta year, in the event that the fruit is sold, its holiness transfers to the money that was received in exchange for it, and now that money (i.e. things purchased with that money) must be treated with kedushat shevi’it.
The Gemara asks: If, the seller did not want to give him the etrog as a gift, what is the? How should the buyer purchase the etrog? Rav Huna said: He incorporates the cost of the etrog into the price of the lulav. He should purchase the lulav at an inflated price to cover the cost of the etrog as well.
This can be done either by specifically arranging that the price of the lulav is high enough that the seller will be willing to agree to give the etrog as a present (Rashi) or simply that a global price should be agreed on and the intent of the purchaser should be that he is paying only for the lulav (Rambam).
While the Mishna is concerned with the situation of the etrog, the Gemara wants to know how a lulav can be purchased during the Sabbatical year. At first the Gemara tries to distinguish between the lulav and etrog by arguing that the rules apply to each of them on different years. The etrog is an unusual fruit in that it is comparable to vegetables in a number of ways – unlike most of the trees native to the Land of Israel, the etrog needs to be watered regularly. Furthermore, unlike most trees that have specific harvest seasons, the etrog remains growing on the tree throughout the year until it is picked.
The conclusion of the Gemara (40a) is that the etrog is a fruit, to which the laws of shemitta apply, while the lulav is considered a tree.