The median is sometimes preferred because it is not sensitive for outliers and extreme values. The mean is sometimes preferred because it is easy to calculate.
Work Step by Step
For example a median can be useful when talking about salaries in a company where the executives earn a lot more than the rest of the employees. To get the median we first have to put the values in order, and that can take a lot of time. It is often easier to calculate the mean.