The difference is that file systems need a lot of “mechanical sympathy” to account for the many quirks inside syscalls and actual physical disks.
There was a nice video about how it is really hard to implement file systems because disks just don’t do what you expect.
Databases are a layer up and assume that they can at least write a blob somewhere and retrieve it with certain guarantees. Those guarantees are a thousand hacks in the file system implementation.