That's only a recent development. Last hundred years or so. And even if it's Constitutional and necessary, as it's part of a criminal penalty, it's a state matter, not one for the feds to poke their nose into.
As long as there are federal felonies, I don’t think that it’s purely a state matter, but it really doesn’t matter for the purpose of this argument whether it’s a state or a federal issue. We’re arguing about the policy in general. The question of whether to do it at the state or the federal level only comes into play if you decide it should be done.