The quoted hemistich about being “wasted” centers on failure to appreciate a person's worth. In its original poem the loss related to military usefulness; the new poem brings it into the circumstance of being sold.
Thus the core complaint survives while the external situation changes. The new composition gains the force of a memorable earlier line without treating that line as an entirely fresh invention.
This is not mere borrowing of an idea: the earlier poetic wording itself has been retained.