"place (papers) in consecutive order for future reference," mid-15c., from Old French filer "string documents on a thread or wire for preservation or reference" (15c.), earlier "to spin thread," from fil "thread, string" (12c.), from Latin filum "a thread, string; thread of fate; cord, filament," from PIE *gwhis-lom, suffixed form of root *gwhi- "thread, tendon." The notion is of documents hung up on a line in consecutive order for ease of reference.
File (filacium) is a threed or wyer, whereon writs, or other exhibits in courts, are fastened for the better keeping of them. [Cowel, "The Interpreter," 1607]
Methods have become more sophisticated, but the word has stuck. Meaning "place among the records of a court or office" is from 1510s; of newspaper reporters sending in stories, 1954. Intransitive sense "march in a line (as soldiers do) one after another" is from 1610s. Related: Filed; filing.