But I think that's the problem. For some things, the "form" is important, things like marketing sites, maybe prose. But for sites that are supposed to be highly functional, information density (function) should always win out. That's not to say that it shouldn't still be presented nicely, and that may make it more difficult. But when I'm browsing files or commit history on GitHub, the more stuff I can see at one time, the more useful it is.
At work we have many internal systems with no padding, confirmation models, etc which are used for development tasks. I am usually afraid when interacting with them and others do not seem to understand why. Recently I made a mistake where I had to click "Accept" on each item in a row of ~100 items. It's a simple HTTP webserver where every button is an <a> and does a new page load which causes a new paint. I accidentally clicked "Revert" on 3 / 100 items because when things reloaded I clicked too soon and the "Accept" / "Revert" buttons are horizontally aligned but vertically offset.
Spacing/padding/alignment improves UX for tools when used correctly.
> information density (function) should always win out
No. Clarity should always win out.
Spacing serves the important purpose of creating an information hierarchy so it's intuitively visible at a glance how things group into larger things. The higher the level, the higher the spacing.
This is why there's more space between words than between letters, between lines than between words, and between paragraphs than between lines. And similarly how there's more UX whitespace between a list and the toolbar buttons above it than there is between list items, and then even more space than that between the main content area and left bar.
Seeing more stuff isn't useful if you can't tell at an intuitive glance which commit a line belongs to, because there's no extra separation between commits.
Information hierarchy is relative. You can totally allow for it within a denser layout, in fact traditional dense GUI's and text layouts pay a lot of attention to proper hierarchy. Where whitespace seems to be inescapable is for separating active elements of a layout, to avoid unintended touches.
You should try UI design. Open Sketch or Figma. Start putting buttons and boxes together. You'll quickly realize that having adequate spacing is absolutely a must. Everything just looks awful without enough spacing.
Usually, the biggest problem a piece of software has is adoption. People are far less likely to adopt your software if the first time they look at it, it looks like a huge complex mess. The sales people certainly won't want to present software like that to potential customers.
it's a mistake to equate information density with function, the more things I see don't matter if they are not legible, there are two extremes of course and a good design makes a good compromise (but removing whitespace completely isn't good, a better solution is customizable density per user)