They write a computer program.
The computer program stores up all the requests during a short time and creates a single transaction at the end of that time that combines all the requests into a single transaction.
That's an implementation decision that each exchange will make for themselves, but yes, typically it would make the most sense to have a computer program handle that for you.
You'd have to ask the exchange what they are doing. Each exchange can decide for themselves how they want to operate.
Most likely the delay after the withdrawal request is implemented so that there is time for the exchange to block the creation of the transaction if they identify a problem.
That shoule take only a fraction of a second.