For Augustine, one's whole life is marked by sin. It is inevitable, therefore, that if one wishes to tell one's life story—write an autobiography—then it will contain a good many examples of sinful behavior. And Augustine is remarkably frank about the many sins he committed before he converted to Christianity, whether it was raiding orchards or living in sin with a concubine.
Augustine's candid recounting of his sins is inextricably linked with his moral purpose in writing the Confessions. By confessing his sins, he hopes to provide an example to those of his readers who want to turn away from a life of sin and walk upon the path of righteousness. The implication seems to be that if someone as deeply mired in sin as Augustine once was could do it, then can anyone.
Augustine could well have recounted his sins without presenting them in the form of an autobiography. But he chose not to, and for very good reasons. By placing his sins within the context of his life, he was able to make himself seem more human, and therefore closer to his intended audience.
Augustine isn't addressing his readers as the Bishop of Hippo but as a man, a flawed human being who has sinned many times in the past, but is now on the right track thanks to the grace of God. In humanizing himself like this, Augustine makes it much easier for us to relate to him. And in doing so, he also makes it more likely that we as readers will take inspiration from his example and follow his path.