As Vidqun's quotes demonstrate the Hebrew 'chesed' represents a variety of qualities associated with intimate relationships. The LXX used the Greek 'eleos' (mercy) for the word at Micah 6:8 and at the equally often quoted Hosea 6:6.
The writer of Matt 9:13 uses that LXX version of Hosea passage "I want mercy not sacrifice' as a proof text for the mercy/compassion Jesus shows sinners and the sick.
At Matt 12:7 the writer again uses the Hosea line to relegate ritual law to a secondary place to human need.
As Narkissos said years ago, the word is flexible enough in an ambiguous context to accommodate nearly any application featuring a 'good quality'.