A story is told about a King in Africa who had a close friend that he grew up with. The friend had a habit of looking at every situation that ever occurred in his life (positive or negative) by remarking, "This is good, Allah Almighty knows best"
One day the King and his friend were out on a hunting expedition. The friend would load and prepare the guns for the King. The friend had apparently done something wrong in preparing one of the guns, for after taking the gun from his friend, the King fired it and his thumb was blown off.
Examining the situation the friend remarked as usual, "This is good! Allah Almighty knows best."
To which the King replied, "No, this is NOT good!" and ordered his soldiers to put his friend into jail.
About a year later, the King was hunting in an area that he should have known to stay clear of. Cannibals captured the King and took him to their village. They tied his hands, stacked some wood, set up a stake and bound him to the stake.
As they came near to set fire to the wood, they noticed that the King was missing a thumb. Being superstitious, they never ate anyone who was less than whole. So after untying the King, they chased him out of the village.
When the King reached his Palace, he was reminded of the event that had taken his thumb and felt remorse for his treatment of his friend. He went immediately to the jail to speak with his friend.
"You were right" the King said, "It was good that my thumb was blown off." And he proceeded to tell the friend all that had just happened. "I am very sorry for sending you to jail for so long. It was bad for me to do this."
"No," his friend replied, "this is good…Allah Almighty knows best"
"What do you mean, 'this is good'! How could it be good that I sent my friend to jail for a year?"
The King's friend replied: "Remember that the Almighty knows best and if I had NOT been in jail, I would have been with you on that hunting trip."
"He knows what is before them and what is behind them: And to Allah go back all questions (for decision)"
[Surah Al Hajj:76]
Do Not Judge Things or Events by its Immediate Outcome!
Although the decisions of Allah Ta'ala may seem harsh to us, they are full of wisdom :)