Prophet Hud - 11:87
"They said: "Shu´ayb, does your prayer require us to give up what our ancestors used to serve or to turn our trade as we wish? You are indeed mild-tempered and wise."
Properly performed prayer keeps one away from evil deeds:
The Spider/29:45
Read from the Book which We have revealed to you and observe the prayer. For prayer discourages from abominable and evil things. The remembrance of Allah (through prayer) is most important. Allah knows what you do.