Of course it does. The tax code is a law written by humans, which means it’s a set of emotional value judgements written in dry enough language that we can pretend what you said is true.
The people applying the tax code can make exceptions at their discretion. It's a difference.
Presumably the rule is there to subsidize child-rearing. When the child is gone (kidnapping, death, ascention to heaven, etc), the law would logically not apply any more, so there will be details about where the cuttoff falls. If people wanted want to give cash to unfortunate parents, judges interpreting the laws should tell you to pass another law for it.