The reason why this school existsTOPGUN, also known as the Naval Fighter Weapons School, actually existed at Naval Air Station Miramar from 1969 till about circa 1993, when a round of base realignments and closures moved the school over to NAS Fallon Nevada and renamed it the Naval Strike and Air Warfare Centre. In the movie, the stated reason for the establishment of the school is stated to be the poor performance of fighter pilots in Vietnam. This was then further attributed to pilots becoming dependent on missiles and forgetting how to dogfight. While it is true that the Navy's primary fighter at that time (the F-4 Phantom II) didn't have guns in its armament, the Navy was operating the older F-8 Crusader up until 1967. The Crusader had a nose-mounted gun for dogfighting and could also carry missiles. The same was true also of the A-4 Skyhawks and the A-7 Corsairs that were still operational at that time. Furthermore, the Navy had a large number of veteran pilots who did know how to dogfight. They could have fixed the problem of a lack of dogfighting skills among newer pilots by just re-incorporating that training as part of regular fighter pilot training. Why establish this special school and invite only one pilot from every squadron to come here, learn the skill, then go back and teach the rest of his squadron? An analysis of the airplanes being flown by students reveals a surprising reason why.
In this movie, we only see F-14 Tomcat pilots being trained at this school. The original school was geared towards training F-4 Phantom pilots. A commonality between the F-4 Phantom and the F-14 Tomcat are that they are rather heavy for a fighter and have powerplants (engines) that are excessive in the amount of forward thrust they generate. In fact, the F-4 Phantom was known to rely more on its engine, rather than its airfoils, to be able to fly (its nicknamed "The Triumph of Thrust Over Aerodynamics" for a reason). That is because these airplanes were conceived not as fighters but as interceptors. An interceptor's job isn't to fight and down enemy fighters; its job is to destroy incoming enemy bombers. Nuclear bombers, to be more precise. They were intended to launch, get to supersonic speeds quickly, get within radar lock range of Russian bombers, and down them with Beyond Visual Range missiles. The F-14 Tomcat's primary and exclusive-to-it armament is the AIM-54 Phoenix air-to-air missile. The Phoenix is a heavy missile with a large rocket, giving it a range of 100 miles — leaps and bounds above what a typical air-to-air missile even needs. This reinforces the anti-bomber role of the Tomcat, as this missile is intended to down a big lumbering bomber armed with a nuclear payload.
In Vietnam, the Navy realized that these heavy interceptors were themselves vulnerable to the more nimble enemy dogfight-capable MiGs. Their own dogfight training given to pilot trainees was intended for a nimbler fighter capable of maneuvering against enemy fighters. Teaching interceptor pilots how to dogfight was considerably more difficult, as these heavy airplanes' performance envelopes were very unforgiving to those who intended to maneuver them as fighters. These aircraft would stall out and fall from the sky if a pilot attempted to turn them like a Russian MiG could. So, they needed an exceptionally skilled pilot who could improvise and maneuver the heavy fighter in a dogfight scenario while remaining within the plane's aerodynamic constraints. Moves that Maverick pulls, such as the one where he hits the airbrakes and forces his pursuer to overshoot, were standard flying techniques being taught since the school's inception. The purpose of this school was to select these above-average interceptor pilots and teach them aircraft maneuvers that would allow them to safely fly the airplane in a dogfight and win. This pilot had to go back and teach his squadron because other pilots may not have been skilled enough to execute the maneuvers this school taught. But if one of their own was capable of executing these moves in air-to-air combat, he would present a sufficient threat to enemy fighters, that other interceptors could focus more on their primary task of shooting down bombers. They would also train their fellow pilots using techniques learned at the school.