Attack on Titan‘s Season 2 Episode 5 or Episode 30 is titled “Historia”, which is Crista’s real name. I think that there are people who actually turns into titans but just like humans, there are good and bad titans.
Back to the episode, Historia is a noble man’s daughter to his mitress, which makes her a half-noble, and always a subject of people’s nasty comments. In order to start a new life without people judging her, she changed her name to Crista. This is somewhat the same with Ymir but she chose to keep her name and this similarity made Ymir wants to get close to Crista. On one of their training, Crista stayed behind to help their comrade and Ymir decided to go with them. Being hard-headed, Crista insisted that Ymir should move along but Ymir refused, ended up leaving Crista behind and Ymir saved their comrade. For some reason, Ymir is also a titan (who ate Berthold and Reiner’s friend way back) but the story on how she became a titan is not yet revealed. The promise that Ymir and Crista made is that once Ymir showed her true self to everyone (as a titan), that will also be the time that Crista will take her real name back.
Back to the present time, Ymir transformed into a titan to save her comrades stranded inside the tower and surrounded by titans. Although outnumbered by the titans, Ymir did her best to eliminate most titans and also asked her comrades to hold on to her while she take down the tower to kill the other titans.
When Berthold and Reiner saw that Ymir transformed into a titan, did you guys missed it that they did not act violently especially when it was Ymir who ate their friend when they were younger? The Scout corps just made it in time before a titan could grab helpless Crista.