God only answers prayers that pertain to spiritual needs. It is a dialogue between man and God. Prayer is conversation with a real Person who actually hears what is prayed and does something about it. Prayer has subjective value too, and blesses the one who prays. If a man never got an answer, he would be a better man for having bowed his knees to Almighty God.
Prayer is objective as well as subjective.
Prayer brings results not just in the man who prays but in the ones for whom he prays, the things for which he prays. A man prays from his home in America for a missionary friend in Africa. God hears the man in America and responds by supplying the need for the man in Africa. The Bible does not explain prayer, but abounds with demonstrations of it. Abraham did not pray just for his own edification.