Why are aircraft parts built in different places and assembled in one?
You can only hire so many people at one place, and also only find so much land there, so when the whole process no longer fits, there is no other option than start building components at other places and move them to the final assembly place.

In part, it is also historical. Airbus, but to an extent Boeing too, was formed by mergers of smaller companies as building a plane became more complex over time. So the companies got already working facilities with already qualified workers. Closing them down would lose them those workers, and cause quite a bit of bad publicity too (and at least in case of Airbus some political pressure), so they got used for whatever part of the process fits in them.

And some factories simply don't have any unused land around them, so the companies can't grow them even if they want to and have to open new ones instead. This is probably worse in Europe, which is more densely populated, so building a really big factory is basically out of question anywhere.