Hit the nail on the head, Dom!
Do you think ROTJ would’ve still worked if the sister subplot was still in the movie, but her identity was just never revealed?
So basically Luke finds out he has a sister, but they don’t reveal to Luke her identity in case Luke fails to defeat Vader and the Emperor. Vader still discovers he has a twin sister, and that triggers Luke, but Luke finding his sister is left open for a potential sequel.