Johnny has post-traumatic stress from being attacked by the Socs, and all he thought about was defending himself.
Johnny is a good kid, but he has a lot of baggage. Johnny was attacked by four Socs, and was “scared of his own shadow” after that.
I remembered Johnny-his face all cut up and bruised, and I remembered how he had cried when we found him, half-conscious, in the corner lot Johnny had it awful rough at home-it took a lot to make him cry. (ch 1, p. 5)
Johnny is motivated by this incident for a long time. He worries about being jumped, and he suffers from a lot of fear as a result of the trauma. As a result, he is very nervous when they see the Socs in their territory.
Johnny swore under his breath, and I muttered, "What do they want? This is our territory. What are Socs doing this far east?" (ch 4)
Johnny was "scared to death" because he did not want to get jumped again. Pony had no weapon, but wished he had one. All Johnny could think about was the last time he got jumped, and when the Socs threatened to cut them he took out his knife and attacked Bob in self-defense.
Of course he felt sorry for killing Bob. Johnny and Pony had to go on the run.