But that scene gives him the true courage to reveal his identity to her. If she hadn't been there, he would've ended Ock's plan, then he would've returned to his double-life. He would have continued to juggle both lives, and he wouldn't have been able to tell MJ anything at all. Now, assuming Spider-Man 3 is a few years after, Peter and MJ wouldn't have been loving each other the way they do in the third, and MJ would have been married to John Jameson. That would completely alter the storyline, and it would have resulted in destroying Sam Raimi's reputation for depicting Spider-Man accurately.
Of course, there may have been other ways to twist the story back into place, but I thought the final confrontation between Ock and Spidey really meant something to MJ. It was more than just a lazy attempt to get Spidey to go after Ock. It was a way of leading up to the revealing.