In the long run if any religious or non-religious practice does not have benefits it tends to fade away. It is my understanding that the main theme of Islam is to create a safe and secure way of life in this world. This can only be accomplished by establishing equity, justice and rule of law for all in the society. In the Sura Al Anqabut of Al Quran, Allah declared, "Innus Salata Tanha Anil Fahsha ei wal munkar" which means "definitely prayer prevents you from indecent and evil deeds". Now talking about a person who prays and at the same time commits indecent acts (be it openly or secretly), it means one of the two things:
1. His prayers are not being accepted by Allah.
2. The ritual Namaaz is not the same as Salaat
Those who know Arabic say that Inna means "for sure" and it is not a conditional phrase. The only way that is possible if a system is established by an authority and monitored to ensure compliance.