The holy book (not just for the Muslims) already declared that we are all sinners, so the praying is to cleanse ourselves of all sins, not to prevent us from committing sins. It is ok to commit sins as long as we do enough praying and confessing to mitigate afterwards.