God wants us to sing in the midst of our trials and to praise and bless His name in the midst of our pain
because all these are expressions of fine feelings.
God uses many hardships, difficulties, and slanders to create praises in His people. He causes them to learn through difficult circumstances to become praising persons before the Lord.