Allardyce criticised his midfielder for venting his anger in public when taken off after just 40 minutes of last week's Premier League fixture against Chelsea at Upton Park.
The Hammers, who were already trailing by two goals, made a double substitution with Cole and Jack Collison being replaced by Mohamed Diame and Modibo Maiga.
Cole, 32, was unhappy and Allardyce was also unimpressed by his player's behaviour: "There's a squad system here that has to be used to the benefit and the best of everybody.
"I totally understand nobody wants to be substituted before half-time.
"But purely from a tactical point of view, I had to change something, the way the game was at that stage, and that's my job.
"We don't hear about how disappointed Jack Collison was.
"So all players have to accept it if I bring them off, they have to accept it's my responsibility to change the way the team's playing, to get us back in the game.
"It's a difficult period but players show their true team spirit in situations like this.
"They show their true togetherness in situations like this, and that's what they've got to do, they've got to stick together.
"They can't fragment and think it's all about them, it's not just about them.
"It's about the whole team and everything that goes with it to achieve the right results."