"That they might witness what the Lord had done for his son" (Mosiah 27:21) is a powerful expression of faith, whether it was said by Alma or written by Mormon. Notice, he doesn't say "what the Lord had done to his son."
I can imagine Alma the elder pleading before God every night that something would change in his son's life. I can picture him praying on his knees that Alma the younger would embrace the gospel again and stop causing so much pain to their family.
Once when I was going through a really rough time on my mission, my dad wrote to me saying he was sorry for how bad I felt, and how much he wished he could take away the hurt. But then my dad expressed how grateful he was that I was experiencing such a faith-growing experience. Like Alma, he was grateful for what the Lord had done for his son rather than being angry about what the Lord had done to his son.
Recognizing trials as growth experiences is a sign of spiritual maturity and one-ness with the will of God.