Wisdom concerns the fittingness and soundness of action carried out with knowledge and will. Affirming divine wisdom does not imply that a benefit defined by creatures becomes an obligatory demand upon Allah in every circumstance.
An event can have many aspects. Failure to fulfill someone's immediate desire is not by itself proof of injustice or ignorance. Equally, one should not invent a particular hidden worldly benefit for every hardship without evidence.
The important distinction is that affirming divine wisdom does not require denying divine freedom and will; nor does denying an imposed duty entail attributing senseless action to Allah.