The folder corresponding to the Nether is called DIM-1 and the End DIM1, despite this not making much sense:
Numerical dimension IDs were deprecated in 1.13, over three years ago (17w47a)
It is not immediately obvious what these folders actually correspond to without prior knowledge
Dimensions now use namespaced IDs literally everywhere else
1.16 custom dimensions do not use folder names like these
These folders should be renamed to something more intuitive and less reliant on ancient, deprecated formats, for example "the_nether" and "the_end", or even "dimensions/minecraft/the_nether" and "dimensions/minecraft/the_end" for consistency with data pack dimensions since they have no right not to be.
Wouldn't it make "legacy" worlds unplayable in newer versions then? For sure, they must be converted in this case, but there could be a problem with servers offering both multi-version client support and those who just want to update their servers without creating new worlds.