Visible crew/equipment: When Jack Black and Jason Alexander are in the gym, Alexander talks about cankles. Watch the upper left hand part of the screen. The boom mic dips into the shot at least twice.
Revealing mistake: When the "real" Ralph is first shown at the Peace Corp office, he has an unattractive and nerdy appearance/voice. When arriving at Rosemary's party in the car, when saying "Amen to that", he suddenly looks fairly attractive and his voice sounds less nerdy. Then when saying "Good luck Hal", his voice becomes nerdy again.
Continuity mistake: After Mauricio hits his head after explaining to Hal about being beat up in gym class, some of his shake-on hair becomes dislodged, leaving five or so bald spots on the back of his head. In the very next shot from the back, the bald spots are filled in again.
Audio problem: When Hal is talking to Katrina, after he's been de-hypnotized, in the over-the-shoulder shot of him facing her, we hear him talking but his mouth doesn't start moving until he turns to look away from her.
Audio problem: In the restaurant, when Hal is standing at the hostess table asking about the booth before Mauricio calls on his cell phone, you can see the hostess' reflection in the small mirror or window next to her and the movements do not match. The mouth in the reflection opens to say yes before she does.
Answer: I think he was in the movie to reinforce that she is a genuinely nice person and that she had a wide circle of friends who appreciated her.