"Rogue One: A Star Wars Story" is a standalone film set in the Star Wars universe that was released in 2016. The film follows a group of rebels as they attempt to steal the plans for the Death Star, a massive weapon of destruction created by the Empire. The filmmakers' decision to kill off all the main characters was a deliberate choice to add a sense of stakes to the film and to establish the fact that the Star Wars universe is a dangerous place.
The death of the main characters serves to emphasize the importance of the mission and the cost of resistance against the oppressive Empire. The film also showcases the lengths that the rebels are willing to go to in order to achieve their goal and how far they are willing to push themselves to make a difference in the larger conflict.
Additionally, "Rogue One" was designed to be a prequel to the original 1977 Star Wars film, and it was crucial to the filmmakers that the events in the film lead directly into the opening of that film. The destruction of the Death Star plans, and the resulting pursuit by Darth Vader, sets the stage for the events of the original film. In order to maintain continuity with the original film, it was necessary to have the main characters die at the end of "Rogue One."
In conclusion, the filmmakers' decision to kill all the main characters in "Rogue One" was a deliberate choice made to add a sense of stakes to the film, to emphasize the cost of resistance, and to maintain continuity with the original Star Wars film. The deaths of the main characters serve to reinforce the idea that the Star Wars universe is a dangerous and unpredictable place, and that victory often comes at a heavy cost."