To answer this question, we first need to establish what the themes of this poignant novel are. I would argue that the main themes are love, illness and death, and rebellion. We are engaged or drawn into these themes as a result of the memorable characters and storyline.
By seeing the world through Stella's eyes, we learn of her deep love for Abby, Poe, her parents, and, later, Will. Despite all that she has endured, her biggest fear is not pain for herself, but pain for her loved ones. When we eventually learn that Abby is dead, readers are engaged in this theme through empathy and understand exactly why Stella feels that she needs to stay alive for her parents' sake. When Poe suddenly dies, we are embroiled in Stella's heartache. We are also drawn into the growing love between Stella and Will, and we find ourselves hoping against hope that a way will be found for them to be together safely.
The themes of illness and death are unavoidable for readers, with both main characters fighting lifelong battles against cystic fibrosis. While Stella has the hope of a lung transplant, Will does not, thanks to the added complication of B. cepacia. Knowing that both characters have a drastically shortened life expectancy engages readers by adding to the emotion of the story.
When we first meet Will, he is rebelling against his treatment, purely because after a lifetime of failed medicines, he has become resigned to his fate. We are emotionally drawn into this rebellion because we instinctively want a happy ending for him and Stella—and this means both of them getting better. Stella's own act of rebellion—leaving the hospital with Will—has readers on tenterhooks, as it is at that moment that lungs become available for her.
In a nutshell, the themes of Five Feet Apart engage readers because they are so compelling and so poignantly represented by the characters.