Haiti, the Western Hemisphere's poorest nation who qualified for the World Cup for the first time since 1974, became the first team guaranteed not to reach the knockout round.
The Seleção got the decisive performance they needed.
"It was what I expected from this match to have a better quality of this match," Ancelotti said.
"Fewer mistakes. More effectiveness at the forward (positions) and more control at the back. And I think this was a good match.
"Of course we have to improve. We have improved and we will improve for the next match."
Cunha, the Manchester United standout, got the start and showed with every surf-and-slide goal celebration why he should have been in the starting lineup in Brazil's listless 1-1 draw against Morocco.
Brazil coach Carlo Ancelotti made the surprising decision in the opener to instead insert Cunha as a late substitute.
Cunha thrilled the Brazilian fans who made up the bulk of the 68,324 spectators at Lincoln Financial Field when he tapped in a rebound for his first career World Cup goal. He then sent a left-footed strike into the upper left corner for a 2-0 lead in the first half against the overmatched Haitians.
Brazil forward Raphinha, who was subbed out with an injury in the first half, had an early goal disallowed on an offside call that only temporarily muted the yellow-clad Seleção fans in an otherwise festive atmosphere at the home of the two-time Super Bowl champion Philadelphia Eagles.
Haitian fans danced and sang "Grenadye Alaso" ("Grenadiers to the Attack"), the traditional battle cry of the national team.
Brazilians chanted back, reminding them their country is the five-time World Cup champion and the home of the king of soccer: "A thousand goals, a thousand goals, a thousand goals, a thousand goals, a thousand goals! Only Pelé, only Pelé!"
Before the game, Vinícius Junior said he thought he had more to show in the tournament - even after scoring the goal that brought Brazil even with Morocco.
"Everyone was feeling lighter today and the field was also in a better condition, so we were able to do our soccer," Vinícius said.
"We hope to continue in this form and continue evolving and improving in the competition, which is what's most important."
He now believes Brazil are hitting their stride.
"This was a very important game for us," he said. "We were able to do our game. It gave us tranquility and superiority inside the field, where we were able to do many plays and score the goals."
Coming off scoring 16 goals in 36 games with Real Madrid, he made an effort to help the defence on several occasions against Haiti and created numerous scoring chances.
Brazil top Morocco on goal difference in Group C with four points, followed by Scotland with three.