Headcanon: how Azula, Mai and Ty Lee become friends
The Royal Fire Academy for Girls:
It's where they first met.
Azula seized the attention quickly in school. She's the princess, the granddaughter of the Fire Lord, daughter of Prince Ozai and above it all an excellent student. Azula was good at everything she does. But she's annoyed at people following her around or asking questions about her life so she pushes them away.
But there's one girl captured Azula's attention. The girl was 100% indifferent about her, she showed no fear or admiration of her status even though she's the Princess. Azula was fascinated by this, so she approached her. She started a talk, wanting to know who she is, Mai responds with a dry joke. Azula laughed. Then asked her "what's your name?" The rest of the class was in awe. Mai was barely a friend to anyone, now she's friend of the princess who refused to engage with everyone.
Mai thought Azula was fun.
There was another girl who was the most persistent of the folk following Azula. No matter how much Azula pushes her away, she keeps coming back. Azula was so angry at one point, before she threatened the girl to leave for the last time or else, the girl performed an acrobatic move. Azula was astonished, she never seen anyone moves that way before. Then there's something clicked, this girl could be interesting after all. Azula thought Ty Lee was annoying, then amazing, she could learn something from her, before she get to know her better as a person. She decided later that she can like Ty Lee after all.
Ty Lee's resolve behind aiming to be the (amazing) Princess' friend was because she wanted to be recognized as her own person, as Ty Lee, not as part of a matched set.
Azula and Mai bonded over comparable interests and personalities. Ty Lee got along with girls she normally wouldn't have gotten along with.