Volume 3, Book 34, Number 316:
Narrated Ibn 'Abbas:
Once the Prophet got his blood out (medically) and paid that person who had done it. If it had been illegal, the Prophet would not have paid him.
1) Who would have done something illegal if Mohammad did not pay the person: Mohammad. that person, or both?
2) Are there instances where Mohammad enjoyed the fruits of someone else's labour, and then did not pay because he said it is illegal?
3) If something was illegal, why would Mohammad even go to that merchant/seller, and expolit them knowing full well he would not pay them?