Dally takes Ponyboy to see Johnny because he was very badly hurt and he is dying.
Johnny was injured very badly in the fire at the church. As a result, he succumbs to his injuries. After the rumble, Dally takes Ponyboy to see him because he wants him to be able to say goodbye.
Dally tries to muscle his way into Johnny’s room with a switchblade, but the doctor says he doesn’t need the knife. They can see Johnny because he is their friend.
Johnny is in bad shape. As Johnny is dying, he is happy that Dally is proud of him.
"Yeah, they're calling you a hero now and heroizin' all the greasers. We're all proud of you, buddy." (ch 9)
Ponyboy is saddened by the fact that Johnny does not look peaceful when he dies. He just looks dead. It is the end of Johnny’s struggle. He was always in pain, from his father’s abuse to the Socs jumping him. At the very least Johnny is no longer suffering. As Dally said, he died a hero and made people look at greaers differently.