In the passage describing the laws of the red heifer, the procedure for burning the heifer and accumulating the ashes is referred to as a chatat, a sin-offering (Numbers 19:9); when describing how these ashes must be used on someone who has come in contact with a corpse, the related verb yitchata is used (19:12). Why? If, say, someone has a heart attack and dies in a house that you are visiting, the death isn’t your fault; where’s the sin?
For one answer to this, we can look at commentary on the sacrifices that a woman brings after giving birth. There, she is required to bring a dove as a chatat (Leviticus 12:6, 8). Again, we could ask, what’s the sin in having a baby? Rabbi Shimon ben Yochai explains: while she was in labor, the woman might have sworn never to have relations with her husband again (Niddah 31b), forgotten the oath, and then violated it.
In a similar vein, the experience of being near a dead body, while not a sin in itself, puts someone at a much greater risk for it. Consider what happens in this parsha. Right after the laws of the red heifer are passed down, Miriam dies (Numbers 20:1). While the Torah records many deaths, this is the first one since the Exodus where a dead person is named and the death is not attributed to his or her misdeeds. Then, when the people grumble about not having water, the usual roles of Moses and God are reversed. Instead of God speaking of a harsh punishment and Moses begging for mercy, God simply tells Moses how to provide the people with water and Moses loses his temper at them (20:2–13). Because Moses could not stay focused on his duty in the aftermath of his sister’s death, he was denied admission into the Land of Israel.