Distance

Use a plotting program to create a color-magnitude diagram of M5, using the following data files. Find the distance to M5 using the method described above.
M5 data file

When we find the distance to a cluster of stars, we assume that all stars in that cluster are the same distance away from us. Although we know that this is not true, we can still get a good estimate of the distance. Why is this?

Why do we use main sequence fitting instead of giant branch fitting or supergiant fitting? What advantages does the main sequence offer us?