Why is it better to use a divider than a ruler, while measuring the length of a line segment?

Why is it better to use a divider than a ruler, while measuring the length of a line segment?

image