A held collection of records, kept in order. First a literal thread - documents strung on a wire so they could be found again.
Latin filum (a thread), via Old French filer; documents were literally strung on a wire or thread so they could be found again, and the name stayed after the wire was gone.
A held collection kept in order. The thread is gone, but the ordering it made possible is the whole inheritance.