In fairness to the widow, she may have figured that the mistress would make a public fuss if the wife did not include her name. If I were the widow, I'd figure including the bastard child's name may be the best of all possible options for dealing with such a humilating situation.
Yes --- we don't know her motives. Chances are she had pity on the new baby and figured he could get a nice amount, maybe even love for her husband made he want to provide something for his child. Maybe she's just a big chump, a door mat. We don't know but it sure looks like she's being taken for a ride now by the adulterer woman --- sometimes kindness or pity can get you problems.