You misunderstood: I meant that people totally do what you described, they treat "race" purely as a set of mechanics. Hence my example of a character who was, in the fiction, a Dwarf...but who was, in the mechanics, an Earthsoul Genasi. People DO treat race as a purely metagame construct.
Well, OK. But it happens a lot less frequently than with class, because players' underlying assumptions about the two typically differ.
My point was that, IMO, 5e made a mistake in making the half-elf so similar to its parents. 4e actually gave the distinction meaning and significance: there are specific, discernible things that half-elves (Dilettante) and half-orcs (Furious Assault) can do that none of elves, orcs, or humans can do.
But "half-elves" and "half-orcs" have been labeled as 'races' since AD&D. And in 5e, half-orcs have the "Relentless Endurance" and "Savage Attacks" features that neither humans nor orcs have.
So the height difference between humans and halflings is socially constructed? The ability to breathe elements is an ascribed status? Having horns and a tail is purely the result of people labelling other people and nothing else? Living for 700 years or more, rather than 60-80 years, is a sociological fact, and not in any way a biological one?
Height =/= race. Masai are tall, and pygmies are short. They are both human, and according to most common racial classifications, they belong to the same racial group. So the fact that height is a heritable trait doesn't make it a racial trait. Horns and longevity aren't necessarily different from height. Tieflings can still be regarded as humans whose ancestors spent a little too much time hanging with Asmodeus. Elves - humans with preternaturally long lilfespans extended through magic (e.g. the sorcerer Dallben in Lloyd Alexander's Chronicles of Prydain; he's 300 years old, but is nowhere identified as a member of a different race. Not clear what would happen to his children). If you look at Tolkien, who inspired the in-game conceptualization of elves, being an elf or a human is, to an extent, a choice (Elrond, Elros, Arwen). And those part-elves who choose to be human have very long lifespans for generations (Numenorians, Arwen, even Aragorn, who is a descendant of the Numenorians, lives far into his second century, but is regarded as human.
Correct: because, between all IRL groups of humans, the biggest difference IS culture, at least from a D&D perspective. The difference between dwarves and elves, or gnomes and dragonborn, or any other pair of races, absolutely includes culture, I don't question that. But if you don't go for "mechanics are just mechanics, you put whatever flavor you want onto them," then there's some level of "mechanics have meaning," aka race exists in some concrete sense. It's more than JUST culture.
You can identify race on the basis of visible characteristics, or you can not. IRL, many people define distinct races within the human species, and there is no reason why the same kinds of definition cannot occur in D&D worlds. In fact, as I've shown above, half-elves, half-orcs, and tieflings are arguably essentially humans who are defined as distinct races. Dragonborn sorcerers, who are descended from dragons, are not defined as a distinct race. The reasons for these divergent definitions are sociocultural.
As for the mechanics are just mechanics, you put whatever flavor you want - I'm just saying that if you are so inclined, you can say that about race no less than class (a lot of people here are making the latter claim, but rejecting the former). Personally, I'm relatively OK with races as they work in-game. I'm just making the comparison to show that if you're being consistent, you should accept both propositions equally.
EDIT: I meant Draconic bloodline sorcerers, obviously, no Dragonborn.