A status, not a verdict
Torah text: Stated in the Five Books of Moses.Tumah is a ritual status. It governed approach to holy space and holy food. It says nothing about a person's character, and it carried no shame.
Everyone became tamei in the ordinary course of life, including the most righteous. Burying the dead, one of the greatest acts of kindness in Jewish tradition, makes a person tamei.