A DJ set isn't always a playlist. A DJ can choose the next track based on what is happening in the room.
Is the energy rising?
Are people dancing?
Did the last song work?
Should things slow down?
Should they change direction?
They can also prepare several possible paths before the night begins, but the audience can completely change those plans. That's why two sets from the same DJ can sound completely different. The music matters, but so does reading the room.