Sometimes they get what they want and sometimes they don’t.
People who pray a lot get what they want at about the same rate as those that pray hardly at all
People who don’t pray get what they want just about as often.
People who pray earnestly get what they want at about the same rate as those that pray half-heartedly.
People who behave well get what they want at about the same rate as people who don’t.
People who badly need help get what they need at, if anything, a slower rate than people who don't need anything at all get more of what they don't need (the rich get richer while thousands starve and die of preventable disease).
God not only answers prayers quite at random, he answers the complete absence of prayers just as much.
He’s a crafty old fellow, that God.