In the original Supergirl material, one of the Arrowverse series, it was Lena who became dangerously ill and this forced Lex to step forward and attempt to cure her. Unfortunately, her attempt resulted in her sister being paralyzed.
The Arrowverse tends to put its own original spin on the stories from the comics it addresses, but the Supergirl deviation here had two specific purposes for which they were to involve a drastic change in the story.
Lena is one of the main characters on the Arrowverse show, but she has always lived in the shadow of her more famous maniac brother, even though he had not appeared until then.
If Supergirl from the Arrowverse had directly adapted the source material, she would have risked relegating Lena to the background while making the story about Lex keeping her from being at the center of a great story.
It was important for Lena to shine because she was a main character in Supergirl, just as important was to show how tirelessly relentless Lex was when it came to achieving her goals in both Supergirl and the Arrowverse.
The Arrowverse series storyline succeeded in doing so, as it later revealed that Lex had intentionally given herself cancer so she could trick her sister into curing her with Harun-El.
Also, knowing that he couldn’t risk her testing the experimental alien drug on him, he orchestrated the James Olsen shooting so that she had no choice but to test her ex-boyfriend on Supergirl, one of the Arrowverse series.
Ultimately to Superman. With Lex, the end justified the complex and life-threatening means, and that’s how you know the Arrowverse and Supergirl got through Lex Luthor.