Xcode is huge, it’s bigger than most games. A lot of that size, is an aggregation of tools, built up over a couple of decades.
Replacing it with a rewrite, would be a major operation, but would probably be required, in order to work on iPad.
They may sell a capable enough iPad but it doesn't make a lot of financial sense unless they closed all the gaps.
I suspect there are dozens of tools, that are years old, have very few folks that know how they work, and probably only work on Mac.
EDIT: I should have read the thread more closely.
It stores that stuff in a different container.
[UPDATE:] I just looked at the contents.
The single biggest component is the toolchains (Swift, SourceKit, etc).
The next biggest components, are the platforms (which may be used to construct simulator images).
These are all wrapped into the app, itself.