Question: why did anubis weigh the heart?
Answer: One of his prominent roles was as a god who ushered souls into the afterlife. He attended the weighing scale during the "Weighing of the Heart," in which it was determined whether a soul would be allowed to enter the realm of the dead.