To Kill a Mockingbird actually begins with a flashback. The first paragraph in the book occurs chronologically after the last page of the book.
Writers employ the technique of foreshadowing when they want to give their reader an idea of something that will happen later in the story. They might decide to do this to create a feeling of suspense on the part of the reader or to give the reader information that will help him/her understand the events leading up to the foreshadowed event.
The book begins with this:
When he was nearly thirteen, my brother Jem got his arm badly broken at the elbow. When it healed, and Jem’s fears of never being able to play football were assuaged, he was seldom self-conscious about his injury . . . When enough years had gone by to enable us to look back on them, we sometimes discussed the events leading to his accident.
The foreshadowing here is subtle. At first the reader does not recognize it as foreshadowing. Only after the reader has realized that Jem and Scout are much younger than thirteen will he realize that this event, the breaking of Jem’s arm, will happen late in the story.
Harper Lee’s purpose, I think, is to immediately signal to the reader that this is a story about youngsters who are going to grow and mature and learn about life over the course of the story.