Mariam in A Thousand Splendid Suns is a woman who has to endure a great deal of hardship in her life: her own illegitimacy, her mother's suicide, and her long, childless marriage to an abusive husband. When she is in danger of giving way entirely to bitterness, she is redeemed by her love and protectiveness towards Laila and Laila's children. Her story is still an unhappy one, but it has the dignity of high tragedy, rather than the squalor of self-centered bitterness.
Self-centered bitterness is a good phrase for the end of Mary Carson's life in The Thorn Birds. She has had none of Mariam's hardships to endure; indeed, her life has been remarkably easy. She married a man of immense wealth, whom she found she could manipulate without difficulty, and, when he died, she used his wealth to manipulate everyone else around her.
Luke O'Neill is, like Mary Carson, an unsympathetic character: an insensitive, selfish, tyrannical skinflint. However, he does not have the same level of manipulative malice as Mary Carson, and his life has been tougher than hers. Mariam manages to care for others despite the hardness of her life, while Mary Carson becomes ever more selfish and malicious despite (or perhaps because of) the softness of hers. If only because of this stark contrast, Mary Carson is the polar opposite of Mariam.