It is common and natural to pray when we need or want something. The problem is when it becomes the whole essence of our prayers. Approaching the Creator of the world only full of desires for ourselves is somewhat like being a self-centered friend.
It is of course allowed and even desirable to contact the Creator with requests. He is God and from whom else shall we ask? The requests show faith in Him and His power. But will happen when our prayers are not answered? Will we stop praying as "the method does not work"?
If we take as an example a parent-child relationship. How will the parent feel if the child relates to him only when he has a need or when he wants something? Every parent will surely agree that they want their child to be interested in them, to thank them, to love them - even when they have nothing to offer the child and the child knows it.
A non-selfish prayer is actually not for the one who is praying but for the one that the prayers are directed towards. If we manage to put Him in the center, before we bring our interests into the prayers, it becomes a prayer with meaning, an uplifting prayer from the created to the Creator when both parties are happy in the relational system.
If we see a friend on the street when we happen to need help with something, will we make our needs the central component of the conversation with him? Or will we ask how he is, take interest in him, and even offer him help?
The quality of our prayers plays an important role in defining the nature of our relationship with God. This affects our lives, mood, and approach to what happens to us and ultimately our happiness and satisfaction in life.