Probably wise in hindsight, given Carrie Fisher's death, but it would remove the Luke-Leia reunion at the end. It's a tricky issue.
(They probably did know about her health issues, though. She's not in a big chunk of TLJ, and she's mostly sitting down. When standing, she's mostly filmed from...