If you apply datapacks that are buggy to a world, then the world can become impossible to delete, although you still can delete them through "saves" folder.
Comments 4
This may be a duplicate of MC-124365, or at least highly related to it. I've assumed that when a datapack loads and runs without issue any failure to delete the world afterwards falls under that ticket (regardless of whether or not the pack was zipped), so I'd be interested to know what sort of formatting issue in the pack itself could cause the same problem.
Could you clarify what you mean by "datapacks that are buggy to a world", and provide an example datapack to help people reproduce the bug?