Legibility.
tl;dr
Really depends on your target audience's average age and reading abilities. Gmail is trying to cater to everyone so they provide options.
I'm not saying which version is "right" as that would take an eye tracking setup and/or tasks that require the user to use the table to answer questions and then see which one had a higher success rate.
As we age our eyes get worse. Always. By the time we're in our 60s we need about 3x the amount of light to see something the same as when we were in our 20s. That white space actually helps us folks as we age.
Also, the muscles that control saccades weaken as we age and a densely packed table, especially one with lines separating columns and rows (read Tufte on that matter, please!), take longer and are less accurate. The closer things are jammed together the more our eyes will go "off track" and jump to lines that we perceive as figure vs ground.
Line height has an impact because of proximity. Too close and rows will be interpreted on a precognitive level as the same element and it takes effort to separate them. Too big and they'll seem like different tables, practically. So, again, depending on your target audience finding the right line height so that rows are seen as distinct but related would be the goal and you'll need data to really say what the right answer is for your needs.
There is a measurable impact on readability for people with dyslexia when it comes to spacing as well. About 1 in 10 people have dyslexia. That's high and likely involves a good number of the people you're designing for.
Remember, the web isn't only for people in their prime though it's easy to forget that in the tech world. Though your app/site may be intended for the young so it may not be a question.
This says nothing about people who have reading and comprehension issues outside of dyslexia if you're trying to make your content as available as possible.
On a personal note, there was a time I'd have liked the more compact table. At 45, with the introduction of 4k and 5k monitors, I'd practically need the more spaced out version. My sight isn't any worse than average for my age.