Allaah has decreed everything for his creation including all that is good and bad with regards to how they see it. As for the decree of Allaah itself, then it is all good, even if it appears as evil to the creation themselves, but out of honoring Allaah we do not ascribe evil to him, rather we ascribe good to him as in the narration,
“… and evil is not directly from You!” (Muslim 771)
even though it is Allaah that decrees everything that happens to a person, both good and what appears evil, relative to a person, He decrees it all, but the word evil is not ascribed to Him out of honor and respect for Him, and hence the narration,
“… and evil is not directly from You!”
In the statement of Allaah,
(وَأَنَّا لَا نَدْرِىٓ أَشَرٌّ أُرِيدَ بِمَن فِى ٱلْأَرْضِ أَمْ أَرَادَ بِهِمْ رَبُّهُمْ رَشَدًۭا)
“… and we do not know therefore whether evil is intended for those on earth or whether their Lord intends for them a right course.” (Al-Jinn 10)
He said regarding evil,
“… whether evil is intended…”
in the passive voice so that evil is not ascribed to Him directly out of respect for Him. As for good, he said,
“… or whether their Lord intends for them a right course.”
directly attributing to Himself because it is good.
“… and evil is not directly from You!”
means that pure evil is not ascribed to you, even if something appears evil but really is good, out of respect for Allaah.