Optimising for low distortion means trading off against something else - sharpness, brightness, size, weight etc. Smartphone cameras have become so good because they're very intelligently optimised using a hybrid of hardware and software.
DSLR/mirrorless users still use lens correction (either in-camera or as part of the post-processing pipeline) because even a big, heavy, expensive pro-quality lens is still imperfect in ways that are relatively easy to compensate for in software.
https://www.canon-europe.com/pro/infobank/in-camera-lens-cor...