A large part of the “value” a DJ brings is track selection; for sure. Playlists can do part of that, say to create a certain mood. But DJs get to adjust these on the fly as they observe the crowd reaction. Additionally, DJs rarely play full songs. Transitions can be drawn out over 16,32,64 bars, taking 1-2minutes. During that time DJs use tools like EQs or stem splitters to ensure the two tracks playing don’t clash.
There’s lots more detail; just take my strongest recommendation to try DJing on hardware with a friend at some point; it’s a richer and more rewarding experience than the “Skrillex pressing play on his MacBook” meme suggests.
Edit: there’s lots more to say about DJing of course, maybe someone else will chime in. One aspect to keep in mind is that DJing is important primarily in dance music. If you don’t go dancing at clubs you may not be aware how different dance music is to traditional music meant for listening. A lot of the focus of dance music is generating tension (“build”) and releasing it in a pleasant manner (“drop”). Doing that at a pace that works for the energy level of the crowd at that moment, without unexpected shifts in energy levels, is not trivial. It requires taste and experience, and aims to create a more cohesive and unified experience for the dancers than a playlist could.
Phew! Can you tell I recently got into DJing? ;-)