The Empire was using the tropical planet as a site for keeping top-secret information and research safe, including the Death Star plans.
Despite such protection, Jyn Erso and a team of Rebels managed to sneak onto the planet while a Rebel fleet kept the Imperial forces occupied in space.
Scarif is one of the more scenic Star Wars worlds, but in Rogue One, it was anything but a vacation destination.
The endgame was obtaining a copy of the Death Star plans, and in the end, the good guys were successful, though it came with great sacrifice.