Development needs a proper keyboard, and a significant screen real estate. An on-screen keyboard shared with Xcode's UI, and further splitting the screen with the app being developed would be very cramped.
iPadOS also has no consideration for command-line tools and shared things that don't belong to any app-silo. If you ever needed something not built-in into Xcode.app, it'd be awkward clash with sandboxing. Is Xcode build supposed to launch a Siri Shortcut of Ruby.app to run a script, with all the GUI animations in between?