City were 2-0 down at the Allianz Arena inside the opening 12 minutes, but drew level through goals from David Silva and Aleksandar Kolarov before James Milner put the Premier League side ahead on 62 minutes.
A fourth goal would have seen City top Group D by virtue of a better head-to-head record against Bayern, who won 3-1 at the Etihad Stadium earlier in the competition.
However, with two minutes to go, Pellegrini replaced striker Edin Dzeko with midfielder Jack Rodwell and appeared to suggest he thought City required a 5-2 win in order to finish first.
The City boss told Sky Sports when asked if he was tempted to put on another striker: "I was tempted if we scored the fourth goal. Of course, that's why I sent Aguero to warm up.
"But also I think it was a risk to continue with Silva. He couldn't play more than 70 minutes.
"It is very important to be first in the group but not the most important thing. It was difficult to score two goals and I think that Silva couldn't play more than 70 minutes."
Match-winner Milner also acknowledged that the City players were under the impression that a further two goals were required to claim top spot.
Milner: "We didn't know if 4-2 would be enough or if we would need 5-2. We thought it needed to be 5-2 to be honest."
Finishing second means City could now face Real Madrid, Barcelona, Paris St Germain or Atletico Madrid in the last 16 next February when the draw takes place next Monday.
Sky Sports pundit Jamie Carragher believes it is 'astonishing' that City did not appear to know the scoreline they needed to take top spot.
"He's given the interview, and I'm still scratching my head that he doesn't understand the rules or what could have got them through," said Carragher.
"The fact that he goes to the press conference and says it again proves that it wasn't something lost in translation, his English is good.
"With what he's saying there, if they get Real Madrid or Barcelona in that draw, people will look back at that.
"He keeps mentioning about the game against Arsenal, but that was irrelevant, you're talking about the last seven or eight minutes that a substitution needed to be made.
"With his comments, it looks obvious to us now he's said it twice, that he wasn't aware of what got Man City through.
"At this level of football, it's astonishing."
Carragher's fellow Sky Sports pundit Graeme Souness echoed that view and was also surprised Pellegrini did not bring on a striker late in the game.
Souness said: "I would suggest that they've not spoken about it and he wasn't aware. Maybe the guys he's sitting with on the bench, Brian Kidd and his other coach, had not spoken about it and weren't aware that 4-2 gets them through.
"When he says, 'if we'd got another goal, I'd told Aguero to warm up', it tells you he's thinking he needs to get five.
"It was one of the strangest substitutions I've seen in a long time."
So he can't do maths? Who gives a f**k, he spanked Bayern away from home. I hope he goes on to hire Johnny f*****g Ball to deal with the counting and let Manuel carry on shafting the oppsosition.- rodger's gusset