In general, you're calculating the magnitude of average velocity. In fact, speed is a vector, and as such it also has a direction and orientation.
So, if you compute the average speed, you're assuming that you went directly from point A to point B, which is basically never the case.
If, instead, you actually moved on a straight line from point A to point B, then the two quantities are the same.