The idea behind this is that speed doesn't tell us in which direction the object moves in a given frame of reference. Speed is one part of velocity, direction is the other part. Depending on the frame of reference, the velocity can be defined with many mathematical concepts required for making the correct analysis.