He was a very shortsighted boss, forcing all his guys to turn down plea deals. His brother Gene might've been home fifteen years ago if John would've let him plea down.
John's mouth and ego pissed off Gravano so much it convinced him to flip. Maybe Sammy was so scared of the can he would've flipped anyway, but Gotti badmouthing him certainly helped push Sammy in that direction. Sammy certainly testified about the leadership of all of the five families too.