God gives -- if asked. That's why we pray. If we don't get what we ask for it is because the prayer is empty or we pray with an evil heart.
What about the other option that we prayed for something honestly, but God knew it would be bad for us (we didn't), and so it didn't happen? One example would be praying to get a particular job. If God already knows it would be a disaster, He might not give it to us to protect us.
It goes without saying that God's Will is at issue, not our will.
Regards