More than that they organize and protect data, and provide a clean interface to allow manipulation of that data. It's no exaggeration to say that providing a file system is one of the major services of general purpose operating systems, and less general ones as well. Files A file is a persistent, hardware-independent, named, protected collection of bits and a collection of operations that can be executed on them. The access operations generally impose an order on the bits. The attributes attributes define what files are used for.
Persistence implies that the bytes have a meaning that extends in time.
Memory used in calculating intermediate results doesn't have that attribute. One wouldn't store the memory used in a computation in a file because it has no long-term use. Because the data in files has this long term significance, files are stored on more permanent media. These days, the most common medium is still magnetic disk, although several others are making bids. Basically anything that can hold information permanently and be read by a computer has held a file system, or will eventually.