If yad means a favor in this phrase, what is the relation?

Metonymy, Compound Figurative Expression and Mental Attribution