Dally Winston is more "dangerous" and experienced than the other Greasers. He has spent time in the tough neighborhoods of New York, has a long criminal record, and has just gotten released from jail when the story begins. Dally, unlike the other Greasers, is "hardened beyond caring". Johnny, with his innocent vulnerability, is the only person Dally really cares about.
Johnny stands up to Dally when he is harassing Cherry Valance at the theater for a couple of reasons. Johnny has a sensitive and perceptive nature, and recognizes right away that Cherry is "a nice girl", the "cousinly type" whom even Dally would treat respectfully if he had stopped to consider that quality about her. The Greasers have a kind of code of honor in the way they treat "nice" girls. Ponyboy remembers that "when Steve's cousin from Kansas came down, (even) Dally was decent to her and watched his swearing".
The other reason I think Johnny stands up to Dally is because after he is brutalized by the Socs, he determines never to let such a thing happen again. His terror as a result of the experience evokes a certain assertiveness in him, so even though Dally is his "hero" and someone whom no one dares confront, he is able to stand up to him when he sees him doing something he perceives as wrong (Chapter 2).