Quoted By:
Going from Malie Library, the Box Legendary appeared from an Ultra Portal in front of Alola's royalty, and although they immediately bowed before it, the Tapus decided to battle it. In the end, the Box Legendary won, "shone it's light"/"cast it's pall" on the royalty, and tasked the Tapus with taking care of its offspring, Cosmog. Afterwards, Alola's royalty thanked the Box Legendary through the playing of the Sun and Moon Flutes, which thereafter were mute presumably due to the lack of a Cosmog or Cosmoem being present at the Altar.
Speeding up to the present, the main reason Cosmog pushed Lillie to the ruins was to reunite with the Tapus, its caretakers. And the reason why Tapu Koko chose the Player to have a Z-ring was that (s)he protected Cosmog on the bridge leading to the Ruins of Conflict.
If all this is correct, then the only loose ends left in Sun and Moon are Necrozma's origins in the Alola Region, what went on on the other side of the Ultra Wormhole, what's on the second floor of the dimensional research lab, and the connections between the Pre- and Post- Gen VI dimensions, including Looker’s amnesia in ORAS. Is there anything that I missed?