Enemy trainers have a levels of psychology and stuff, and the more you interact with any given trainer the more they respond and a greater response range opens up. Particularly Rivals and other dedicated trainers, but you get most of the options with any fightable NPC. You can greet them, tease them, provoke them, taunt them, you can get them so riled up they demand a battle on the spot, and the more you've tormented them the more they pull out the stops, absolutely determined to see you lose.
And you can watch them break as you systematically ko each and every single Pokemon they have. You can watch the realization dawn on them as you make them understand just how outmatched they are. Finally, you can watch them drop to their knees, defeated, as you knock out their last Pokemon like it was barely a speed bump.
The instant they do, you can walk over and offer them your hand. You can apologize, saying that you gave them a hard time because you like them and you couldn't think of what else to do. You can help them to their feet, and you can ask if they forgive you, and you can ask if they don't mind you walking with them back to the Pokemon Center. They can say yes.
You can hold their hand.