I don't think that for a specific published setting that it's as big a deal. Most of the time, I'd expect someone to know what game and setting they're going to play, so their expectations should be set. I don't always agree with all such restrictions....for instance, I don't think that Dark Sun having gnomes or not makes any significant difference to the setting. And I say that as somone who has little to no love for gnomes. But players for such a game will approach it with the expectation "we're gonna play some Dark Sun", and so they'll know that some options will be off the table, and others will be altered.
But if it's a homebrew game, and the DM has decided that there are no tieflings, no drow, no dragonborn, and that there are level limits to how far elves can progress in any class but wizard, and dwarves are limited to fighter and cleric, and so on....that seems a bit more arbitrary. Because most folks would approach a homebrew game as "we're gonna play D&D" so they would assume that the options presented in the PHB would be open to them. Taking that away is a pretty extreme alteration from what's expected.
And in cases like that, the DM may have told the players what to expect, or may have even created a home brew document to serve as a campaign guide or primer. And that's great....it helps align expectations. But even in cases like that, I think that most such restrictions still seem arbitrary. No gnomes isn't really much of a defining characteristic for a setting. No elves or no humans would be more significant, and probably more thematic.
I think it boils down to not being self-centered. Players should realize when their idea for a PC doesn't fit the game world that the DM is presenting. On the other hand, the DM needs to own up to the fact that his restriction of "no drow" isn't about anything other than his personal taste. Both sides need to be willing to compromise a bit. There's not just one person at the table.