The film, City of God, is structured around the concept that young men in Brazil often choose a path of crime through competitive drug trafficking usually involving murder. As young boys, they are inspired by the pipe dream of having a dominant role in their neighborhood (Rio de Janeiro) which is mostly a slum.
The film is structured as to jump from a characters childhood and upbringing to adulthood. The characters mostly have nicknames and the narrator of the film will either show a brief moment of the future and then take the audience back to the past to show us how this character became who he is or how he got his nickname. The narrator's role in the film is to tell the stories of these young men and at the same time show how they are connected and how he himself became who he is as an adult.
My belief that the purpose of basing the film in Brazil is due to the realness of the gangs in Brazil and for other countries to be able to see their stories and dig deeper into how the slums are influential on how the children grow up. The film gives Brazilians a voice and sort of clarify our (Americans) perception of them and why there is so much crime in their country.