Playlists allow spotify to create a moat. It encourages you to listen to (and build) playlists, that wouldn't then be easily available if you try to switch platforms
For those unaware, there are services like TuneMyMusic [1] and Soundiiz [2] that allow you to transfer playlists between platforms for a fee.
Spotify did shut down certain API endpoints last month [3] though, so there's no guarantee these services may continue working for Spotify. Worst case scenario you'd have to download your data [4] and then figure out a way to create playlists on the other platform.