Here's a good summary of what it actually does. https://chrisdown.name/2018/01/02/in-defence-of-swap.html
TL;DR that swap shouldn't be seen as "spare RAM", but a mechanism for paging out anonymous pages, which is desirable in many circumstances in avoiding OOM situations and making memory management work better. It paradoxically typically reduces I/O thrashing.