It seems to me to be a perfectly reasonable extrapolation of the existing rules:
- Undead are immune to Cure Wounds and all similar spells, thus cannot gain hit points by healing.
- Undead are immune to having their life force destroyed via a Nine Lives Stealer.
- Some undead are given explicit healing abilities; the Vampire, for instance, needs them to adjudicate how long it takes for the creature to return from its gaseous form after being reduced to zero hit points.
The long rest is presented as a form of 'natural healing': not only do "characters" (SRD 5.0, p.87) regain their HP when finishing a long rest, they also regain some portion of their previously expended hit dice, reduces the character's exhaustion level (if any) by 1 (SRD, p.192), and can recover from diseases (SRD, p.204).
The undead (a.k.a.: "restless dead") are not vulnerable to most of these things, not having a life force to need 'refreshing', and thus have no reason (or, to some, ability) to rest.
A DM could certainly allow animated undead to use the rest and recovery rules to regain hit points, but there is plenty of justification in the rules for making the alternative ruling, that undead do not heal 'naturally' and only regain HP if they have specific means to do so (as the Vampire does) or are restored in some other fashion.
I can agree with the idea that magical spells of health restoration would not work on undead (just as the spells specifically say they cannot). But hit dice and the healer feat are non-magical. If a creature has hit dice, it can use it to recover health unless a spell, ability, or stat block specifically says it cannot. Nowhere in the game does it say "undead can't recover health".