Databases and filesystems are both systems which mediate the interaction between user and stable storage.
Often, the implicit aim of a database is to capture as much as they can about the structure of the data they store. The database is the all-knowing and exclusive arbiter of access to data.
If a user wants direct access to the data, a database isn't the right choice, but interacting directly with stable storage is too involved.
A Filesystem is a lightweight (container) abstraction in between a database and raw storage. Filesystems are opaque to the system (i.e. visible only to the user) and allow for a simple, hierarchical organizational structure of directories.