Why do you think Montag, Granger, and the rest head toward the ruined city?
In Fahrenheit 451, a dominant symbol is the Phoenix. It adorns the firemen's helmets and trucks, as it is a creature consumed by fire. Not only this, but a phoenix is born of fire, so it is symbolic of hope and new beginnings--that which survives destruction.
So, Montag, Granger, and the other surviving Book People walk towards the ruined city because they intend to bring hope and new beginnings to the city destroyed by fire (the Phoenix) in the form of books and knowledge. In this way, they intend to restore, rebuild, and resurrect a society based on the freedom of book-learning. The censorship of the old city, the dystopia, is obliterated, and now they intend to rekindle of the fire of knowledge out of the ashes of ignorance.
Enotes says it best:
Bradbury leaves us with the hope that through these books, society will bury some of its destructive force. By ending the book in a fire storm of bombs, there is the sense that this old society of conformity will die and a new one will be born out of the ashes, like the mythical phoenix to which Granger refers. "A time to break down, and a time to build up. Yes. A time to keep silence, and a time to speak," Montag thinks as the book people move up the river at the end of the story.