If Jesus had consented that the woman should be stoned to death, it would have conflicted with his teaching on love, mercy, and forgiveness, and he would have lost his reputation as a friend of sinners.
Jesus showed us another way of avoiding conflict with the ignorant – hold onto your knowledge and play along with them.
Often, ignorance or poor understanding of the law causes conflict because the implementation of a law by an authority could be misjudged as victimisation, and another party’s interpretation of a law could be misconstrued as discrimination.
If Jesus had condemned Martha, it would have meant that Jesus loved Mary more. With Martha being the elder sister, it might not have augured well between the two sisters.