My hobby is to approach star wars from the standpoint that the unplanned imagination outmatches the engineering that the creators ultimately state as the “story”.
So they drew up the X-wing, and THIS was brilliant, looking only at the pictures of the X-wing, but once the canon worked out the details of what an X-wing would be for various story details, well, that was a miss, and the X-wing is real , and doesn’t mostly work that way.
First, it has vectored thrusters, and accelerates accordingly. An x-wing rockets. So does the EVEN BETTER A-wing. (well, the A-wing is space only combat).
That means that X-wings (controlled by electro-mechanical systems that are very resistant to electronic warfare) fight like the ship in the 2d game asteroid. The pilot has throttle, and hard-wire control over some vector plates, and space is big enough to allow this sort of flight. (actually, it’s hard, and takes a bad-ass pilot to make it work).
The X-wing is dual purpose, and is used in both atmospheres AND vacuum space, because so much combat crosses this boundary. Sure, you can fly an A-wing into an atmosphere, but a well built plane will make fotty totty out of a ship that flies on rockets alone, needs to fight gravity, AND can only shoot straight forward. The wings let the X-wing fly lateral to the surface, execute harder turns, and generally increase its combat survivability against specialized aircraft.
Then why isn’t the X-wing more aerodynamic?? aerodynamics won’t inhibit space capabilities, so why not just make a plane with space capable rockets?? well, X-wing pilots are best at shooting like asteroid. They “turret”, allowing them to hold any trajectory, but point any direction and set up a line of fire. Several space fighters working together can point as a group, and fire several lines of fire in any direction. Once in an atmosphere, the x-wing is still not a plane. in order to have superiority in combat, groups of fighters will need to still use coordinated lines of fire to best aircraft which are much lighter (not having space rockets and jump-drives), and significantly more agile. They can’t EVER out-dogfight aircraft. If the X-wing is boxy shaped, and intentionally not very aerodynamic, the pilot will be able to point the X-wing WITHOUT changing its trajectory, and lay down a line of fire because the craft is ALREADY creating enough turbulence in forward flight such that pointing won’t suddenly slam the craft with a brick wall like boundary layer. The turbulence will increase some amount, but the craft will not rip apart, and it will not try to suddenly foil off in a new direction. All of the X-wings in a formation will be able to by flying in a direction, suddenly all point in unison to any direction that isn’t straight down, and fire in unison without significantly altering their trajectory, giving them a counter-advantage AS WELL as allowing them to continue to fight in atmospheres in the same basic fashion as they do in space.