I'm assuming one reason is frameworks. They can get quite big.
Another reason, is rusty code (not Rust. It's a play on the saying "Code doesn't rust", which I used to hear, last century).
It does, indeed, rust. Actually, "rots" is probably more apropos.
I'll bet that's the reason that Xcode is such a pig (makes GMail look like an anorexic).
Code is created that people no longer understand, so they are loath to make large changes. They just do enough to fix a bug, and pray that they don't need to dig any deeper. One of my first software jobs, was exactly like that.
When that happens, the code never shrinks. It just accretes.