Though she had inklings before, it became clear to Lilo once she had turned twenty (and after knowing him for close to three-quarters of her life) that Stitch would never show signs of age. As a genetic experiment, Stitch’s physical development would forever be arrested: he would forever look the same as he had on the day that she had met him at the age of six. And while comforting to know that he would be a constant companion for her throughout her life, it caused her distress.
She wanted to confirm her suspicions so she looked through Jumba’s files. From the best of her understanding of all the information Jumba had on his creation of Stitch and Stitch himself, Stitch was physically immortal.
She realized at age twenty that Stitch would outlive her. Her best friend, her ʻohana, who had been in her life since she was six, would continue to live on after her life had ended. Stitch, who she loved more than anyone else in the whole universe, would have to endure her death. That would be his future. He would outlive her and would outlive any children she had, and her grandchildren, and so on, ad infinitum.
Stitch did not deserve that pain. She thought it to be completely unfair that Stitch would have to suffer the pain of losing her and any of her descendents for the entirety of his existence.
She had realized long ago how much they both needed each other and it greatly hurt her that she would not be able to uphold her end of that. That at some point in the future (hopefully, a long, long time from now) she would no longer be able to be there for him. That she would be forced to leave him, her ʻohana, behind.