A kohen is allowed to make himself impure only when one of four categories of people dies: 1) his parent 2) his child 3) his brother 4) his unmarried sister. Why these four exceptions, and no more and no less?
Let us start by suggesting why a kohen may not become impure in general. It seems to me that this is because he must always be ready to serve in the Temple. If he touches a corpse, he makes himself impure and unable to serve for at least seven days. He must avoid this, in case he is needed to perform Temple service.
But when certain family members die, the prohibition on becoming impure is suspended. Which factors can be strong enough to override our interest in having the kohen always ready for service?
One natural guess would be that due to the emotional bonds a person feels to their immediate family, it would be cruel to exclude them from the burial and mourning process. But a person can mourn without actually approaching the corpse and making themselves impure. And it is not obvious why one's bonds to a married sister would be so much weaker than to an unmarried sister or a brother.
A variation of this approach is to note that the Temple is intrinsically a place of happiness ("usmachtem lifnei hashem elokechem") and life (the tablets in the Temple, like the tree in the Garden of Eden, are an "etz chaim" guarded by keruvim). (In fact, this may be the source for the entire prohibition on ritual impurity, which typically comes from death, in the Temple.) Perhaps a kohen will be so distressed by a death in the family that he will not be able to carry out his service with the properly happy attitude. But here, too, it is not clear why the Torah should differentiate between married and unmarried sisters.
When thinking up this post on the bus today, I came up with a third possible reason for the prohibition. I couldn't rule it out, but now I've forgotten it. So as I now present a fourth reason, keep in mind that I'm not 100% sure it's correct.
The fourth possible reason is that the kohen was needed for the actual work of carrying out the burial. Let us assume that the burial process necessarily involved men, if only because certain parts of it required heavy physical labor. We can see that the relatives for whom a kohen may become impure are exactly those who would likely not have another man available to bury them. For this purpose, imagine now that I am a kohen and one of my relatives has died.
- If my father dies, he may not have any brothers, and his father is probably dead by now (or at least too old for physical labor). If my mother dies, there is a good chance that my father has already died and the situation is the same. Thus, the task is left to me.
- If my child dies, he or she may not have a brother who can bury them - leaving the task to me.
- If my brother or sister dies, I may be the only brother, and our father may be dead or too old - leaving the task to me.
But there is an exception to the last rule: if my sister is married. Then, her husband can perform the burial, so there is no reason for me to do it and become impure.
This reasoning explains each of the categories listed in the Torah. The only exception is a married daughter, who by this logic should be buried by her husband, not by her father. But we may suggest that in general a man's daughter, unlike his sister, would not get married until after he lost his life or physical vigor.
Having concluded that the law here is based on a balance between the need for Temple service and the need to carry out the burial, let us now look at the case of the kohen gadol, who was not allowed to impurify himself for any relative.
We could justify this law by adjusting the balance from either of its ends. We could say that the kohen gadol's need to serve was greater - he was expected to offer at least one sacrifice every single day ("minchat chavitin"), unlike the normal kohen who might be called on to serve only on rare occasions. (Of course, the fact that even these rare occasions necessitate a constant avoidance of impurity indicates how important Temple service actually is.) Alternatively, we could say that his need to bury was lesser - he necessarily lived near the Temple, and plenty of other people were around to do the burial for him.
There is one circumstance where, perhaps, we can test which of these alternatives is true. If even the kohen gadol encountered a "met mitzvah" - a corpse with nobody to bury it - he was required to bury it, despite the resulting impurity. Does this prove that the kohen gadol could not bury his relatives only because other people were around to do it, so in a case where by definition nobody was around, he was required to bury?
It is tempting logic, but I don't think we need to throw out the consideration of the kohen gadol's daily sacrifice. That is one mitzvah, but burying a corpse is another mitzvah. For the kohen gadol who has just encountered the corpse, perhaps we can say that the more immediate mitzvah of burial took precedence over the mitzvah which would only have been performed later that day.