Prayer has a reality beyond the words pronounced and the movements performed. The core of prayer is to remember Allah in the heart at all times.
The core of prayer is to remember Allah in our heart and this should manifest itself in our daily life. Muslims start their prayer with this phrase, "Allah is the greatest," which means we prefer his will over our worldly desires. Praying has two aspects one of which is the outward face of it including some words pronounced and a set of actions performed. The other aspect of prayer is related to the heart. Praying should boost the Zikr (remembrance of Allah) in the heart in a way that prevents one from doing bad deeds. Not all people remember God and fear him through their heart. Therefore, the number of people who perform the outward aspect of prayer surprises us and makes us ask why they, despite praying every day, still do bad things.