What yield to maturity measures
YTM is the internal rate of return of a bond's cash flows. Unlike the coupon rate or current yield, YTM captures coupon income, price appreciation or depreciation, and the reinvestment assumption.
For an investor comparing bonds with different coupons, maturities, and prices, YTM provides an apples-to-apples yield comparison.