I'm not sure it was the right thing to do, it was just the calculated decision West Ham took. It may backfire with more negative PR as a result of that decision.
I think West Ham were wrong to have played him yesterday but I have some sympathy for them. They've invested £30m in a player and through no fault of their own they're expected not to play that player, weakening their ability to get results and possibly further impacting the club's finances. Although CL qualification is unlikely, they're in the mix for it right now and the difference between qualifying for the CL or EL is worth £40-50m and the difference between qualifying for the EL or no European football is worth £20-30m. It's far easier for Joe public to say they should suspend him or sack him than it is for West Ham to actually do. And while some West Ham fans will be saying they should now, give it a few months and there will be no sympathy for West Ham from their own fans if and when performances tail off.