People are what matter to Johnny the most--the important people in his life, especially Dally and Ponyboy, as well as the children who were trapped in the church; children who needed saving much like Johnny had needed from his abusive parents.
Like most heroic figures, one of the traits that make them heroic is the ability to put others first. He put Ponyboy first in the fight with the Socs, and he put the children first in the fire. The fact that he could do something to save them brought new energy to his life and allowed him to face the danger without fear.
Johnny spent much of his life trying to be invisible, trying to survive. Saving the children from the fire gave him purpose and meaning that helped him transcend his struggles.