The way the game works is you need to collect "lights", the "lights" that you need to collect are what is shown in the openings and from various discussion during the anime... Tomoya is already said to have this light form various sources from S1 and After Story, implying that this is his second chance to make things right.
If you haven't figured it out yet, Tomoya is the robot that you see in the openings with the lonely girl. This explains why he heard of Nagisa's play, but couldn't remember from where. It's because he "lived" it, in a sense. There's some debates on various forums that I been to, that say Nagisa is the girl you see. Which would make the story come together a whole lot more. It also explains how Nagisa knows of a play that not even her parents can remember.
All in all, the only way to get this ending from the visual novel, is by completing every single ending in the game. Which is about 15 from what I can tell. So not a lot of people ever truly saw this ending, unless they loved the story as much of us do. The only ending they saw was Nagisa dieing, or Tomoya with the other heroins.