Salat is undertaken by someone who is in complete obedience to the Teachings of Allah, the Qur'an. Salat is following this 24/7 so when you are in this 'state' you will do what is right and avoid the wrong because you know the difference between the two.
An honest man never steals.
A doer of Salat does no wrong.
A pooja namaazi does not know what or why he is doing this, so "Allah Knows best"!