He [Zechariah] was chosen by lot, according to the custom of the priesthood, to enter the LORD’s sanctuary to burn incense. When the time of the offering of the incense came, the assembled worshipers were outside praying. And there appeared to him an angel of the LORD standing on the right side of the altar of incense. (Luke 1:9-11)
At the beginning of the first century, around the time when John the Baptist and Jesus were born, hundreds of priests probably came to Jerusalem each week with their division to serve in the temple. The priests busied themselves with the offering of sacrifices, as well as with various tasks of purification, such as for lepers who had been cured or for Nazirites who had finished their prescribed periods of consecration. All of this was in accordance with the rites described in the Written Torah and Oral Torah.
However, the offering of the tamid (the daily community sacrifices, cf. Num. 28:3-4; Exod. 29:38-43 ) each morning and afternoon required the services of only a small number of priests. Participation in these sacrifices, therefore, was determined by lottery: “The superintendent said to them: ‘Come and cast lots’” (Mishnah, Tamid 3:1). Participating in the burning of the incense, which came at the conclusion of the sacrifices, was considered an especially prestigious task for a priest. In fact, a priest who had won this honor once could never be included in future lotteries: “[The superintendent] said to them: ‘You who are new to the rites of incense, come and cast lots’” (Mishnah, Tamid 5:2).