I would hope that if there were real guys like Maverick in the Navy they'd be grounded and discharged instead of coddled til the killed a teammate.
Well, if he'd gotten permanently grounded after the first time he buzzed the tower it wouldn't have been an interesting movie. And the context in which the reason Iceman thinks he's dangerous isn't because he's afraid of Mav's aggressive flying, it's because Mav had just gotten dressed down by an instructor in front of everyone for leaving his wingman, that being Iceman, who promptly got popped. Iceman tells Maverick his unwillingness to be a team player is going to get his teammates killed by the enemy because the enemy is dangerous enough as it is, but Mav not keeping his team and mission in mind will get everyone killed that much easier. This in fact is the whole point of the Naval Fighter Weapons School, which is to teach pilots air combat skills and tactics at the very highest level. Iceman is telling Mav to get with the program. Up to this point, aside from buzzing the tower, there's little Mav had done that would have got him kicked out of the Navy, he merely would have washed out of Top Gun and gone back to his squadron.
And in his defense regarding Goose's death, the F-14A killed lots of pilots due to asymmetrical compressor stalls at high AOA leading to flat spins, which is exactly what happened in the movie. (Seriously, the TF30 engines in the F-14A would compressor stall if you looked at them funny. They stalled in jet wash. They stalled at aggressive changes in thrust. Too much yaw when high AOA would trigger a stall, and the F-14 had plenty of adverse yaw in high AOA. At the time the risk was considered acceptable and the Navy expected to have upgraded engines that ended up being over 10 years late.) During ejection the canopy also had a tendency to float above the fuselage if the aircraft was in a stall. Real life procedures had to be put in place where if the aircraft was in a stall/flat spin, the crew should pop the canopy and give it a chance to clear before pulling the ejection handles. What Mav considered himself "at fault" for was for aggressively trailing Iceman instead of laying back a bit and giving Iceman a some time to cook which is what ended up getting him in Iceman's jetwash and causing the compressor stall, but that's not against the rules, and isn't in and of itself more risky than any other aggressive maneuvering in a plane that had lots of ways to kill its pilots.. All things considered it's entirely reasonable he would have been cleared by a board of investigation. Mav just takes it especially hard because he'd promised Goose he wouldn't let him down, and feels his aggression created a situation that got Goose killed.
That is the first movie. He backslid pretty hard by the second one.
Again, in his defense, the only two times he "broke the rules", he was the only one who would have paid the price. He flew the Darkstar for the speed record after he got word that Admiral Ed Harris had shut the program down because he wanted to give the people who'd worked so hard to develop it their win, and he knew that he would catch the blame and worst that would happen is he'd be grounded and separated. We know this because Admiral Ed Harris mocks him for only being a Captain after thirty years in service, so he's long been living on borrowed time. (One thing the movie gets right is the only way you can be a Captain as long as Mav was and still be in the Navy is either you have irreplacable skills, or you have interest from someone with influence. Mav had both, much to Admiral Ed Harris' chagrin.)
The second incident is after he flew the training course without authorization, and he'd already been removed as senior instructor. Mav had been removed not because of anything he'd done, but because the students still weren't able to complete the low level training course and Mav's protector Admiral Iceman had died and Admiral Jon Hamm just plain didn't like him. His goal here was to prove that the mission profile he'd been training his students to perfect
could be done, and it if they could pull it off they would survive, rather than the much more conservative profile that Admiral Jon Hamm advocated but admitted would end up getting pilots killed. Again, here, the only consequences would have been for Maverick, he was already out of the program and the worst that would happen is he'd be grounded and separated (which was an inevitability now that his "guardian angel" Admiral Iceman was dead.)
What we see consistently from Maverick in this movie that is that he's more than willing to accept excessive personal and professional risk to himself, but is deeply anxious about his students and the people he cares about taking similar excessive risk. This is where the Rooster subplot comes in, because he's so wracked with guilt over how his reaction to his father's death indirectly led to Goose's death, he doesn't want Rooster following his path.
And I'll let it end at that because this is not the "Critical Analysis of Pete 'Maverick' Mitchell Thread". To wrest things back on topic, here's an article about the Israelis comprehensively destroying Iran's F-14 fleet. I guess it's a good thing they didn't let that movie languish in development hell even longer than they did.
https://www.twz.com/air/iranian-f-14-tomcats-meet-their-doom-in-israeli-airstrikes