IE had many non-standard APIs that were much more convenient to use than what the standard was providing (innerHTML, document.all)
And rather than moving to the standard, more and more code was written targeting IE which also had a conveniently large user-base.
ESM is the standard. CJS is the solution proprietary to node.js.