Why bring Wanyama into it?? He was in the last year of his contract and was not going to sign a new one. So as far as I can see it there were 3 options you could take.....
1) Were you going to hold a gun to his head and make him stay against his will,
2) Let his contract run out so that he could leave on a free when it expired
3) Knowing that he wasn't going to renew, sell him to recoup as per the generally accepted way of doing things.
The club chose the generally accepted way of doing things, which you seem to be whinging about.