Following on from this question, what is the in-universe explanation that Incom, the sole manufacturer of X-Wings, is permitted by the Empire to remain in business? From the Empire's POV the rebels are terrorists and it would be easy to locate and shut down the shipyard making their very distinctive fighters.
The implication is that X-Wings were produced commercially. The Rebels were probably only a minor customer, but their successful use at the Battle of Yavin meant that they became synonymous with the Rebellion.
Ciena bit her lower lip as she studied her readings. “I read five ships, probably starfighters. So far I can’t ID ship models, but I’d guess we’re looking at X-wings or Y-wings.” While a handful of those starfighters remained in civilian hands, by now X-wings and Y-wings were used almost solely by the Rebel Alliance. Piett’s intel had been correct; the TIE patrol would move into attack mode at any moment.
When asked how the Rebellion had managed to lay their hands on them, Matt Martin, Lucasfilm Exec (and member of the Lucasfilm Story Group) indicated that they were, at one point, available to purchase by planetary governments.
Q. I recall that the Lost Stars novel mentioned that x-wings were available to the public before being solely affiliated with the rebellion. Were they civilian craft at some point? I kinda confused on that part...
MM: I'm not sure if I'd go as far as to say there was a civilian version. They were likely available to local planetary defense fleets, militias, etc.
Q. So it basically went from an Imperial reject craft, to a local defense ship for militias, and the Rebels decide to take em in. No hijacking required. Got it, thx.
MM: Something like that. I’m sure the full history of the X-wing can’t be explained in a tweet.
This is based on Legends canon information, but as there are no canon level tags added to this question it is relavent.
The 1980s produced West End Games RPG stated that Incom was taken under control of the Galatic Empire, however many of its staff particularly the X-Wing design team were sympathetic to the Alliance and smuggled the X-Wing designs and Prototypes to the Alliance.
X-Wings were manufactured in hidden Alliance facilities in places that were not fully under Imperial control.
The Empire rounded up the Incom staff and placed them into transports to be taken to a prison planet. The Alliance intercepted these freeing the Incom personnel.
Later after the fall of the Empire as David Jonston notes in his answer they formed a new Incom producing fighters for the New Republic.
Star Wars Rogue One The Ultimate Visual Guide says Incom was in fact taken over by the Empire to cut them off as a source of weapons for the Rebels. However they apparently went back into the X-Wing business after they were taken away from the Empire by the Rebellion. Wookiepedia says they were producing updated X-Wings for the New Republic under the name Incom-FreiTech which presumably reflects a merger.