The velocities at various points during the interval may not be constant, but this is the average of all the velocities during the time interval. If the object had been moving at this constant velocity, it would have ended up with the same displacement as the the case with the varying velocities.