These answers are either implausible or unnecessarily complicated.
The "the assassination attempt was intended to fail" makes absolutely no sense. Were it not for the unexpected and unpredictable arrival of the beat cop, the murder would have concluded uninterrupted. The cop couldn't have been in on it, because he exchanged gunfire with the Rosatos. If the hit was a ruse, then the film should have provided a more plausible explanation for its lack of completion.
The best explanation is the simplest one. Coppola screwed up. He had a major plot point in the last half of the film in which Pentangeli plans to rat on Michael. However, he realized too late that this betrayal was completely unmotivated. So, in post-production he added the Danny Aiello line "Michael Corleone says hello".
That fixes the Pentangeli motivation problem, but it created a new problem: why did the Rosato brothers announce to Pentangeli that Michael Corleone was behind his murder when the film later reveals that Hyman Roth was the one who ordered the hit?
It is an obvious flaw in an otherwise outstanding film.