It is sort of a coda to Rogue One as by the that point, all the main characters are dead. It shows what they accomplished in stealing those plans, and how they got out of the system while keeping Vader's description about Leia being his only link to the Rebel base and only the one set of plans to be recaptured. A few ships (like the Ghost) manage to escape before Vader arrived, but they didn't have the plans. There wasn't time to make copies, as that process was in the works as Vader was boarding the flagship. Leia's escape is desperate, as she wasn't part of the original plan (since the plan was thrust onto the Alliance by the Jyn's Rogue One unit). Leia's mission was going to head off to recover Obi-wan Kenobi, but her ship was still docked when the fleet moved out from Yavin IV. The ending places the plans in Leia's hands, adding them to her original mission to get Kenobi. The coda becomes a bridge as A New Hope starts in the immediate aftermath of the Battle of Scariff with a desperate Leia finding a way to complete her missions in the face of Darth Vader personally coming to stop her as she entrusts both missions to a droid....