The median is a good choice for handling outliers because it's less sensitive to extreme values compared to the mean. By replacing outliers with the median, we can reduce the influence of extreme values on the analysis and obtain more robust results.