I went to school down the road from the Top Gun school in the 1980s when it was at Miramar, and used to see the jets flying a lot.
The story I heard on the creation of the school was that when they analyzed air combat in Vietnam, they noticed that if the pilot survived the first few encounters, his subsequent survival rate was noticeably higher. That sort of makes sense. The school was created so that the pilots would get the first stressing combat experience in a school, rather than against a real adversary with real missiles. That was also a motivation for having a resident opfor at the school - those guys looked and acted like adversaries.