system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars]What's the reasoning behind putting an astromech droid in an x-wing?

The scene in A new Hope where R2D2 winds up fixing a small part of Luke's ship is pretty iconic, but it got me wondering, an astromech is only going to have access to a very small part of the ship for in-flight repairs.  
What else does the AM unit do that makes it valuable enough to add so much weight to the ship.
gpt
They're used to calculate jumps to hyperspace, getting to a distant area takes many jumps requiring accurate calculations to prevent crashes into planetary bodies etc. The X Wing isn't big enough for a computer for this without sacrificing its ability as a fighter so astromechs are used.