It was a movie making decision. The flight scenes are not flown by the actors. Instead they are in the back seat while actual pilots fly them.
The f-35c is a single seater. The Navy isn't letting actors fly their jets. So the only choice is the super hornet.
The f-22 is an air force jet, not Navy. Top Gun is Navy. The f-22 is also single seat.