Numbers 6:20

And the priest shall wave them for a wave offering before the LORD: this is holy for the priest, with the wave breast and heave shoulder: and after that the Nazarite may drink wine.

Numbers 6:20 belongs to the rites that completed a Nazirite vow, in which the priest waved the offerings before the Lord. The things so waved were holy for the priest, and they included the wave breast and the heave shoulder. Bringing the vow to an end required costly offerings, with purification sacrifices and ceremonies to be performed.

Only after those offerings had been made was the Nazirite permitted to drink wine again. So it was with the four men in Jerusalem who were nearing the end of their vows. Their purification sacrifices still had to be offered to complete what the law required.