Characters in story interact and develop relationships with each other. The relationships could be in the form of friendship, love relationship, rivalry, antagonistic relationship, etc. They are part of growing elements of a story. As the story progresses, the relationships very often also change in various ways.
There is one key writing choice that could contribute significantly to that process of developing characters' relationships, and that is to challenge them.
In life, generally, a status quo is desirable, while unpredictability is not. But in a story, I think the opposite is true. We want our stories to be dramatic, full of surprises, and able to present new wacky ideas to the audience. And one thing that creates such effects is by ruining the audience's comfort in characters' relationships.
For example, Yu-Gi-Oh! (1996) tests Yugi and Joey's friendships over and over again through the series. The most difficult test came when Joey was mind-controlled by Malik and forced to a deadly duel with Yugi, where the loser would lose his life. Yugi had no choice but to accept the duel and in the end, decided to sacrifice himself to save his friend. Fortunately, Joey was able to regain his mind at the last second and both of them were saved.
This conflict brings an unwanted change in Yugi and Joey's relationship. Joey is helplessly controlled by a stronger enemy to kill his friend, while Yugi is forced to choose between saving his life or his friend's. In the end, both of them prevail thanks to Yugi's unshakable trust for Joey and Joey's unconscious determination to not hurt Yugi.
The whole idea of this writing choice is to give the characters a chance to reaffirm their relationships. The characters are challenged by the situation to prove how strong their relationship is. Most of the time, the relationship would be left stronger than before. Other examples include Shujin and Saiko's team split in Bakuman (2008) and Rocket and Star-Lord's conflict in Guardians of the Galaxy Vol. 2 (2017).
But it's not rare that the characters would fail to prove themselves. In Hunter x Hunter (1998), Killua's decision to be friends with Gon was questioned by his brother during the Hunter Exam. Overwhelmed by his fear, Killua chose to abandon his friendship with Gon and his chance of being a hunter by killing other Hunter Exam's candidate, Bodoro. Later on, this particular arc was repeated in the Chimera Arc's storyline where Killua broke free of his brother's influence and finally be able to put his friendship over his fear.
The interesting thing about this case is how Gon's react after Killua was forced to go home after killing Bodoro. He stated that he doesn't like the idea of being tested for his friendship with Killua. This is kind of ironic considering that the whole storyline is an elaborate plot to test the characters' resolution in their relationship. In the end, Killua made a promise to never abandon his friends, and Gon managed to enter Killua's residence by not giving up of their friendship. Whether Gon likes it or not, he's passed the test and successfully strengthen his friendship with Killua.