Parshas Acharei Mot begins with G-d telling Moshe to tell Aaron after the death of his sons not to just walk into the adobe of G-d and then moves on to a discussion of the Yom Kippur service.
What is the relationship between these two things, the death of Aaron's sons and Yom Kippur?
Earlier, Aaron's sons had committed a sin. They had died. This seems like the natural order of things. A grievous enough sin leads to death. But instead G-d informs Moshe and Aaron of Yom Kippur, and beyond it, of the larger idea that G-d forgives sins. And that this is a major function of the Kohen.
The priesthood is not meant for personal aggrandizement. The Kohen should not simply feel free to make himself at home in G-d's house. Or to take arrogantly take on privileges as if he were entitled to them. He is there to represent the people before G-d. And this is the function of the Kohen Gadol on Yom Kippur. He asks G-d for forgiveness for their sins.
At the root of the death of Aaron's two sons was a misunderstanding about their place and their function. They were not members of a privileged royal family. But nor was their death a reminder that people were doomed to sin and die. Because Aaron's sons had forgotten their function, the Jews had a lesson in that sin could kill, but that G-d could and would forgive it as well.
By telling Aaron about Yom Kippur, G-d was explaining the proper nature of religious leadership to both him and to the Jews. Jewish religious leaders are not meant to aggrandize their own power, but to deepen the connection between the people and G-d. The Kohen must be humble. He must first ask for his own forgiveness. And he must remember that he is there to ask for forgiveness for the people.
In the House of G-d, Yom Kippur was an opportunity to rebuild the relationship with the Jewish people from the top down by reminding those at the top that they have a responsibility to those at the bottom. Religious leaders must go into the Holy of Holies to bring the people closer to G-d. Not for their own sake. But for the sake of bringing G-d to the people and the people to G-d.
When that is the case, then sin can be forgiven and the relationship restored. Without that, death can follow sin. By taking on the responsibility for the people, the Kohen Gadol could save their lives, as Aaron would do during the plague, and he could ask for mercy and forgiveness for them.