Rob isn't just Alvy's best friend; he's his complete opposite. (Opposites totally do attract, at least according to Annie Hall.) While Alvy is neurotic and insecure, Rob is an outgoing actor who oozes confidence—and arrogance. While, as a character, he's largely a sounding board for Alvy's anxieties, he's also unafraid to share his playboy wisdom on show business and women.
Rob's the one who first introduces Alvy to Annie, and he's eager to set Alvy up with a new gal the moment Alvy mentions that things have cooled between him and Annie. To Rob, that's what friends are for.
Theirs is a bromance for the ages. Not even Rob's move to Los Angeles and total embrace of Hollywood's superficial culture (which is totally played for laughs) can break his and Alvy's bond. They have an intimacy and a shorthand—as evidenced by their calling each other "Max"—that neither has with anyone else, least of all the opposite sex.