Real were dumped out of the Copa 4-2 on aggregate by little Alcorcon, with Pellegrini jeered by fans as he substituted Lassana Diarra.
But he insisted: "The crowd was angered by the departure of Lass. That is what angered the public, as he was having a good match. I felt that it was best for him, as it was his fourth game in four days.
"He could have been injured in those last 20 minutes. I could not be selfish.
"I knew if I changed Lass, the fans would not like it. It was important not to have an injury. If I had been more selfish, I would have kept him on. But I did not think of myself, I thought of the team."
He added: "I have no doubt that the players are with me. It is not easy to comeback from four goals down."