And TBH, in the early days of DOS – let's say up to MS-DOS 3.3 – it wasn't a lot better than CP/M. No command-line editing, no file manager, disk partitions of max 32MB, no built-in disk cache. This was the version that was a big hit and it was kinda basic.
IBM built PC DOS 4.00 and MS licensed it from them. It was bigger, slower, & a bit more complicated – but it started offering improvements.
It provided part of the impetus for DR to offer DR-DOS 3.41, the first widely-distributed version. It had the key improvements of PC/MS-DOS 4.00 (disk partitions >32MB being principal) but it was as small as MS-DOS 3.3 and as compatible.
The DOS market only became competitive when DR introduced DR DOS 5, which integrated all the most important 3rd-party enhancements: 386 memory management, a disk cache, a full-screen text editor, and a graphical file manager... and it was sold at retail for the first time, as an upgrade to (and improvement over) MS-DOS 3.3, PC/MS-DOS 4.00 and vendor-proprietary tweaks like Compaq DOS 3.31 (which was the first DOS with >32MB partition support in the way that became standard.)
MS was more or less forced to respond, which it did with MS-DOS 5 which pretty much matched DR DOS 5 feature-for-feature, including being sold at retail.
The next few years they competed hard, each trumping the other on features in each release.