Doesn’t it say that it’s a retirement fund, intended to be saved until retirement age? The 10% penalty is little more than a wrist slap level deterrent, too. It’s usually like ~1 year of returns. Not a huge deal if you need to dip into it.
(There’s plenty to criticize about the whole 401k system of retirement accounts. But these criticisms seem misguided)