It is difficult to find a balance between showing realistic depictions of peoples' reactions to a crisis (which may often be selfish) and also depicting a character who puts themselves aside for the greater good. While Anna, in this scene, definitely prioritises the greater good and doing the right thing over herself, she is still hindered by the guilt she feels at learning of Elsa's "death".
He was never fully able to descend to Azula's level because he always valued at least his own people. This meant that once the propaganda and brainwashing was shown to be wrong, he was more quickly able to switch to the good side.
Marinette is also frequently the first person he goes to when he has a problem. He genuinely trusts her judgement. And let's not forget that Marinette forgets how to string sentences together around him so it's not even a situation of them just being really close friends. It's him actively getting through Marinette's awkwardness in order to be close to her.