

Because the app you’re working on is using all of the space it requires. It has no need to expand into the unused space.
Web pages and office documents are tall items that already take up as much of the screen as they reasonably can. Perhaps you could move the tool bars to the sides (and many applications do have these options), but users tend to find that cumbersome and that still doesn’t even come close to utilizing that space. Instead they are kept in a format that allows you to comfortably put two documents (or other windows) side by side because that’s FAR FAR more useful than pointlessly expanding the UI.
UIs are justified in not pointlessly expanding into space they have 0 use for; leaving it available for other actually useful applications.
When I go to the buffet, I take what I’m actually going to eat, leaving what I don’t need for others; I don’t just empty the table into a bag knowing full well I won’t eat it all.