why is "her" sa in one part of the sentence and son in the other?
Because "la mort" is a feminine noun and "le testament" is masculine. All possessives such as "sa" and "son" depend on the object, not the owner.