It seems everyone thinks swap is "ONLY" for additional memory. They need to go back and read the OP.
Yes, that's what it is mainly for. But it is also used in laptop hibernation. This is where the current state of your computer is stored. But it sometimes used for "in-place" upgrades as a place to store things off the file system. It is also used as a holding place while some RAM applications "defrag"
themselves.
For example, ( this doesn't happen anymore with newer versions of Java ) 1.7 and older wanted your application
to run in contiguous memory. So lets say you had 4 GB of RAM, and your Java app took up 2GB. No problem right?
I have 3 GB of RAM free. But if it wasn't in contiguous memory space ( all one single RAM block ) it wouldn't load
because even though I had enough free RAM, it wasn't all together in a single block. It that case, it just used swap
as contiguous memory.
Also there are still a few old programs that want to load certain metadata in swap, they won't even let you run
the program unless you have a swap partition. They don't care if you have 120GB of RAM free. They won't run
without swap. Some RAM heavy applications ( Oracle databases comes to mind ) have there crash logs written
to swap by default, in case your system crashes due to running out of memory.
It mostly isn't used by anything anymore, unless you have a laptop that's sleeping, or you run out of memory.
But that's certainly not all it's used for.