If it isn’t clear already, God places a lot of emphasis on being clean. Most of His laws have to do with ritual purity—don’t touch this, don’t eat that—but in regards to specific service in His Tabernacle, the priests had to make sure their entire body was clean.
This is accomplished for the first time in Leviticus 8:6, and it kicks off the entire process of ordination for the priests. Before the robes and the turban and the Urim and Thummin are put on, the priests had to start with a totally clean body.
There is some disagreement as to where this cleansing took place. Some argue that, for privacy reasons, the priests were washed behind a curtain. Others maintain that this washing (with provisions for modesty) largely took place in front of the entire nation. Verse 4 does say that the congregation was assembled, so it seems like there was an audience of some kind.
I don’t have an opinion on the matter other than to say that it took place with the knowledge of the entire congregation. They watched Aaron and his sons become clean before they entered into service, knowing that the hands that would administer their sacrifices were clean also.
Ritual purity before worship would extend even into the era of Herod’s Temple. Stationed around Jerusalem are dozens of mikvehs—gigantic pools that were used for ceremonial cleansing. Most of them are right near the Temple, with some especially ornate ones most likely reserved for the upper and priestly classes.
It was most likely these mikvehs that were used on the day of Pentecost. In Acts 2, when Peter told the people to “repent and let every one of you be baptized,” 3,000 people responded to the Gospel and were made clean from their sins through baptism.
For some reason, a lot of people argue that baptism isn’t necessary for salvation, denying what’s plainly laid out in Scripture. But at least for Aaron’s sake, without being washed and purified, there would have been no spiritual service for him. He couldn’t be that close to the Temple without being clean.
Hebrews 10:22 makes this connection more explicit. The writer says that we should “draw near” to God since our hearts have been “sprinkled clean” and our “bodies washed with pure water.” In short, our cleansing through baptism prepares us for spiritual service, just as the washing in Leviticus 8 did for the priests.