There's actually a bit more to it than that. A lot of what Apple apps actually do is hidden in frameworks made for that one specific app, which, unlike with 3rd-party applications, are part of the system, not of the app itself.
Compare the size of Safari.app versus Safari Technology Preview.app (which actually ships all the frameworks it needs).