Isn't struct dirent what the original UFS (Unix file system from like v3 or even earlier) had as contents of directory files? And yes, directories were files with a special bit set in permissions in UFS and BSD's FFS.
I'm virtually certain that exposing that on disk struct to users had so much legacy code that struct dirent was just not worth updating when the capability of using multiple file systems got added to various kernels. We're stuck with it, an accident of history, just like we're stuck with FAT filesystems for boot partitions and similar.
POSIX and SUS both define only d_ino and d_name in struct dirent, so there's not really any legacy left. Everything beyond those two values is an extension by the implementation. I'm arguing that the implementation in Linux is fundamentally poor. They've actually changed the API for this in the past when they switched system calls from readdir to getdents.
I'm virtually certain that exposing that on disk struct to users had so much legacy code that struct dirent was just not worth updating when the capability of using multiple file systems got added to various kernels. We're stuck with it, an accident of history, just like we're stuck with FAT filesystems for boot partitions and similar.