Because Ymir was in love with King Fritz. This one part of Chapter 139 recontextualizes Ymir's entire backstory for the reader. If we are to believe Eren's explanation that Ymir loved Fritz, then surely it must go back to when she just got the Titan power, because she went straight back to him after being hunted out!
Ymir is in love with Christa/Historia and is very protective of her. She openly expresses her feelings when she promises Christa that they will marry after the war.
She went into her past as a nameless child, being turned into a Titan at Paradis Island, and regaining her humanity after devouring Marcel Galliard. Ymir began living her life without regrets, except the one of not being able to marry Historia and expressing her love for her.
Perhaps the highlight from the Q&A session is about the canonically confirmed romantic relationship between Christa/Historia and Ymir, which Maxwell states that she “ONE THOUSAND PERCENT” ships.
After being brought back to Marley, Ymir willingly allowed herself to be killed and was eaten by Marcel Galliard's brother, Porco Galliard, transferring the power of the Jaw Titan to him.
Sexuality. Whilst Ymir's sexuality is never confirmed explicitly, it is accepted by the majority of fans that she is lesbian, as her only canon love interest was Historia and there is a scene with Reiner in which it can be implied she expresses a disinterest in men.
The choice Mikasa had to make was to hold onto her love but not be a slave to it. And that was the only way for Ymir to free herself from her slavery, let the power of the titans leave earth and to finally rest.
At the Animagic 2014 series panel, producer George Wada confirmed that Ymir and Historia are "indeed a couple", which confirms that Historia in fact has romantic feelings for Ymir. When she was still acting as Krista, Eren secretly disliked her and she envied him for having clear goals.
Ymir's words cause Historia to throw the syringe, and to reject becoming the Founding Titan. In one of the song lyrics it mentions how two people kissed, most likely implying Historia and Ymir have had shared a kiss before.
To "reward" Ymir for her service, Fritz took her as his concubine and together, they had three children: Maria, Rose, and Sheena.
Most believed it was the farmer as the Military Police stated, meanwhile the other half believed Eren Jaeger was the father. However, in Chapter 139 the theory was debunked and the Farmer was confirmed the father of Historia's baby.
Ymir literally says she wants to marry Historia in her last appearance. This isn't played for laughs, it isn't indirect. She LITERALLY says it. This is also one of the only direct statements of someone wanting to marry someone else in pretty much the entire series except for Falco whose feelings no one seems to deny.
Not only was Historia a friend of Reiner's, but she was also his crush. She was one of the few people inside of Paradis who he wanted to protect, even as he fought against the Survey Corps.
Historia and Ymir are not AoT's only leading queer characters however. Titan scientist and later, Survey Corps commander, Hange Zöe, is canonically non-binary, with Isayama affirming that the character is not to be referenced with gendered pronouns.
After Ymir's demise, her daughters Maria, Rose, and Sheena Fritz devoured her corpse and gained her ability to turn into a Titan. As per their father's commands, Ymir's daughters reproduced to expand the bloodline and continue the race of humans who can turn into Titans.
Now why does Ymir want to protect her? It is basically because she learned that Krista had a shady past before they even joined at the survey corps. This became one of her reasons to protect her. Another reason is that she recognize that she has something to protect, and it is nothing other than Krista herself.
During Season 4, Episode 20, "Memories of the Future," as Grisha Yaeger struggled with his task to slaughter the Reiss family, there was a brief flash to Eren kissing Historia's hand. This confirmed exactly what Eren saw that caused him to do everything he's done since: he saw the future.
Fanon. People have noticed how similar Eren and Ymir are, and usually use this to compare EreMin and YumiHisu, ships that both have a hot-headed, Titan Shifter, and the other being sweet, petite and somewhat physically weak. While their interactions were limited, their friendship is somewhat popular.
To "reward" Ymir for her service, Fritz took her as his concubine and together, they had three children: Maria, Rose, and Sheena. It was speculated that during this time, Ymir grew to genuinely love and care for Fritz despite his behavior and attitude towards her.
Canon. Historia and Reiner didn't seem to be very close, but Reiner seemed to have an interest for her since season one in the anime and the manga. He brought up multiple times how he wanted to marry her; the first time was when Reiner, Jean, and Armin escaped from the Female Titan's grasp.
Ymir is officially documented by multiple sources (character bios on anime's website, character bio in the official guidebook) as being physically 17. She has now revealed that she has an extra 60 years tacked onto this, in which she did not age.
Eren would leave for Marley shortly after Historia got pregnant; 10 months later, she would give birth during Eren's rumbling. While this could just be a coincidence, many have argued it is anything but.
But if your referring to Ymir, Historia's friend then that's a different girl. Ymir Fritz is dead. Ymir-without-a-last-name would not love Eren either because she loved Historia.
It was Eren who rescued Ymir, and she decide to help her rescuer by making his wish coming true.
Eren tells Ymir that she doesn't have to be enslaved, that she is waiting for someone to end it all. Eren asks for her help to choose him and finish everything. Another scene change happens; back at the battle, Eren's severed head grows a spin. This is similar to the creature that attached itself to Ymir.