Johnny is defending Dally in front of Cherry because greasers stick up for each other.
This incident occurs in Chapter 2. Your quote is on page 26 of the 1989 Dell edition.
Cherry is a Soc, and Socs usually do not socialize with greasers. When Johnny, Ponyboy, and Dally are at the movies, they run into Cherry. Cherry is a nice girl, and she talks to the boys even though they are from the wrong neighborhood. She likes Pony and Johnny, but not Dally.
"You two are too sweet to scare anyone. First of all, you didn't join in Dallas's dirty talk, and you made him leave us alone. Aid when we asked you to sit up here with us, you didn't act like it was an invitation to make out for the night. …” (Ch. 2)
Dally was rude to the girls, and Cherry in particular thought he was a pig. Johnny and Pony were polite and although they stood up for Dally, they did not excuse his actions. This is Johnny’s point when he says that gang members stick up for each other.
The conflict between the greasers and Socs is the main conflict in the book. It is the reason that Johnny kills Bob in the park. However, both groups stick together because they look out for each other.
Pony tells Cherry that Dallas would be nice to her if he knew her better.
"He'd leave you alone if he knew you," I said, and that was true. When Steve's cousin from Kansas came down, Dally was decent to her and watched his swearing. We all did around nice girls who were the cousinly type. (Ch. 2)
The point is that Pony and Johnny look out for Dallas, and the greasers are a gang because they look out for each other. Dallas has a bad reputation, but he seems to be worse than he is. The others have to look out for him because that is what gangs do.