This, I agree with.
I guess my point is, when about 25% of the Monster Manual is made up of these types of foes, it's probably not all that rare for this to come up. And, it's also not too much of a stretch to think of entire adventures made up of this 25%.
The reverse is also an issue, when you consider something like the Ranger's Class Feature - Favored Enemy. IMO, "player selections/decisions" should be relevant in the game. A Ranger that selects a particular "hated enemy" should have a reasonable opportunity of encountering that enemy in a campaign. However, DM choices will always trump player choices in this aspect. If a DM decides to never run an encounter with a favored enemy, the ranger player never gets to use his class feature. He "suffers" from the same issue as the rogue with the sneak attack feature in an undead campaign. The player decision is being totally cancelled by the mechanics, and the DM choices.
My issue with the "rules" at that point is that the fix is so trivial that it seems ridiculous for the general rules to be so restrictive. Somebody posed the example of Sneak Attack affecting everything, but wraiths being an exception. To me as a player, and as a DM, that is a much more workable, and desirable mechanic than the default of - all undead, constructs, and plants are immune to Sneak Attack.
I can envision that constructs, as "machines" of some sort, can still have vulnerable spots. So I can see them all still being affected by Sneak Attack, the PC is basically gumming up the cogs of the machine, but there can be exceptions. The Juggernaut, for example, might be immune or resistant to Sneak Attack. A particular golem such as an Iron Golem might be the same. I find that to be a better solution "rules-wise".
This is the same issue with the "prone" condition in 4e, which I describe more as off-balance for those creatures that would seem "immune". I can see the general rule simply describing the prone condition, and any effect that imposes that condition works similarly. Then I can have particular monsters that are immune to it. If as a DM, I don't want a Gelatinous Cube to be affected by that condition, then make it immune.
The issue is not that some class abilities should not work under certain conditions. The issue is that the game mechanics should not make player decisions irrelevant under large portions of the general rules.