If vehicles can be damaged, that also means they should be able to be repaired. Some repairs will require a complete rebuild or drydocking, but smaller fixes can be done in the field.
In the heat of battle, even.
Mechanic skills are often used during down time to fix stuff. But try giving the heroes some chances to use typical down-time skills during battle. It really adds tension to the die rolls!
Commentary by memnarch (who has not seen the movie)
Huzzah! BB-8 gets to do something cool! It's very convenient that a plasma bolt only damaged the X-wing enough to require some inside repairs, but hey! The more realistic damage would have been that the whole ship exploded, so we can't have that. It's also pretty cool that BB-8 can pull back inside the X-wing to fix things rather than being stuck looking at the top like Artoo was in Episode IV. In the context of "astromech droids can fix ship damage", this makes a lot more sense and probably makes for a neat animation as well.
I feel very similar to Corey here some days at work. I get a call for a problem to fix, and when I get there, it's something a lot more simple and boring than I'd have liked. Fortunately for me though, it's never been quite to the point of seeing sparks fly out of the equipment to judge what's going wrong.
GM: PIE fighters appear in hot pursuit.
BB-8: Here comes the parade!
[SFX]: Pow! Pow!
Allan: I love a parade!
Leia: Allan, take out the last gun! Then we can deploy bombers.
Allan: I’m on it!
GM: PIEs fire! <roll>
Allan: Dodge! 7!
GM: You’re hit! <roll>
GM: Weapons are down.
BB-8: That’s me! I retract into the chassis and run a level 3 diagnostic.
GM: You can literally see sparks coming from the fuse panel.
[SFX]: zzzzt... zzzzt...
BB-8: I guess level 3 was overkill...
GM: I dunno; without it you might have missed the billowing smoke.