Assuming the operating system's file system is built on some B+tree, the filename is the key (a UUID) and IO calls like fopen() and fclose() will have O(logn) access time. Files, while being modified, can be locked to prevent race conditions. Yes, there is inode overhead (1 million files in a folder is ~40MB), but I'm not using a 1994 desktop machine anymore.
What am I missing?
In Microsoft Windows locks have a lot more authority, such that it is possible for two Windows machines to connect to a Microsoft Access database (file-based, a lot like sqllite) over a file share and not conflict with each other.
Windows machines go out to lunch a lot waiting for locks to clear so that is your tradeoff.