According to the Mishna (daf 61a), the special Shavuot sacrifices – the shtei ha-leḥem and the kivsei atzeret – the two loaves and the lambs brought for sacrifice – needed tenufa (waving) done to them. Tenufa is defined in the Mishna as extending them to the four directions and bringing them back then raising and lowering them.
The Gemara brings a number of explanations for this practice –
Rabbi Ḥiyya bar Abba said in the name of Rabbi Yoḥanan that one extends them and brings them back to dedicate them to He to Whom the four directions belong; one raises and lowers them to dedicate them to He to Whom the heaven and earth belong.
In the West (in the Land of Israel)it was taught as follows: Rav Ḥama bar Ukva said in the name of Rabbi Yosei bar Rabbi Ḥanina that one extends the lambs and brings them back in order to keep off harmful winds; raises and lowers, in order to keep off harmful dews.
Rava said it is the same reason with the lulav. Rabbi Aḥa bar Ya’akov would extend and bring it back and say, ‘I am shooting an arrow in the eye of Satan!’ But it is not proper to do so, for this will induce Satan to incite the Jewish people to sin.
Rishonim point out that there is a practical difference between the reason suggested by Rabbi Ḥiyya bar Abba in the name of Rabbi Yohanan and the one raised by Rav Ḥama bar Ukva in the name of Rabbi Yosei bar Rabbi Ḥanina. According to the first approach, the point of waving the sacrifices in different directions is in order to offer thanks to God who rules the entire world. Such recognition would be appropriate in all sacrifices. The second approach, which connects waving the sacrifices with wind and dew, would appear to be appropriate specifically at seasonal crossroads, e.g. the holiday of Shavuot when the fruits of the tree are judged and on Sukkot when judgment is made regarding rain for the upcoming season.