Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
Allah is All-Knowing, and His knowledge encompasses all things, including the past, present, and future.
He has also ordered us to pray to him and has promised to answer us according to His knowledge of what is best for us.
So, prayer is answered according to Allah’s wisdom; for sure not everything we pray is granted to us, as we wish. If Allah were to answer all the prayers as humans want it, then there will be chaos in the universe; for each person would be praying in his own way as he deems good for himself or herself in a given circumstance.
How often we realize that we ought one thing was good for us at a given moment, then later realized that after all, it was not good for us. I remember the case of a person who wanted to get on a flight desperately, but he could not get it.
Next day, he woke up to hear the news that the flight crashed and all of the passengers were killed!
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.