How is that not malicious? Particularly coming from a supposed supremely powerful and supremely good entity?
Because the blessings both in this world and next from the suffering outweigh the "suffering", Imam Jaffar (a) from Misbahal Shariah:
Affliction is an adornment for the believer and a mark of honour for the man of intellect, because facing it directly needs steadfastness and firm-footedness, both of which confirm belief. The Holy Prophet said, 'We, the company of the prophets, are the people who have the hardest trials, then after us come the believers, then the others like them.'
Whoever tastes the food of affliction while under Allah's protection enjoys it more than he enjoys Allah's blessing. He yearns for it when it is not there, because the lights of blessing lie under the balance of affliction and trial, and the balance of affliction and trial lies under the lights of blessing. Many are delivered from affliction and then destroyed in blessing. Allah praised none of His bondsmen, from Adam up to Muhammad, until He had tested him and seen how he fulfilled the duty of worship while in affliction. Allah's marks of honour come, in fact, at the last stage, but the afflictions themselves come in the beginning.
Whoever leaves the path of affliction is ignoring the lamp of the believers, the beacon of those near to Allah, and the guide for those on the right path. There is no good in a slave who complains of a single trial preceded by thousands of blessings and followed by thousands of comforts. Whoever does not show the patience required in affliction is deprived of thankfulness in the blessings he receives. Similarly, whoever does not give the thankfulness owed for blessings is denied the patience owed in affliction. Whoever is denied both of them is an outcast.
Ayyub said in his supplication, 'O Allah, verily seventy comforts and ease did not come to me until You sent me seventy afflictions.'
And Wahb ibn Munabbih said, 'Affliction to a believer is like a bit to a horse and a halter to a camel.' Ali said, 'Steadfastness in relation to belief is like the head to the body. The head of steadfastness is afflictions but only those who act righteously understand that.'