In the previous episode, Dead is Dead, Ben stated that the wall was built to keep people out of the temple built on the island. In the second or third season, Locke was watching the orientation video for the swan station when he discovered that part of the film was cut out and missing. Hours later Mr. Eko returns into the hatch and tells Locke a story about a man who built a temple built of gold from only using a book. He goes onto say that he found the same temple on the island and found the book. Eko opens the book and there is a picture of the missing film and tells Locke to reach in and grab it. Doing so Locke is able to see the rest of the video. I think that the temple Eko is talking about is the same one that we are seeing now. Theory by JuicyGirly