Swap does not “take” RAM. Swap adds fake RAM from disk. When apps are out of memory, rather than failing due to being unable to allocate memory, they can use disk as a very slow alternative to memory.
It is the difference between failing completely with out of memory and slowing down for a little bit.
No, it is related - as there’s more space to work with, the OS can keep more files cached in RAM with sleeping applications swapped out. Which probably improved performance.