Stephen’s "friends" all serve a similar purpose: their presence allows us to see Stephen in action. Instead of hearing about him from the largely internal perspective Joyce gives us for much of the novel, he eventually lets us observe Stephen in conversation. This is a pretty brilliant choice; in most of these long stretches of dialogue, we get an objective snapshot of what Stephen is like and what he believes at the moment. We also find useful contrasts between Stephen and his peers, which gives us some understanding of how he appears to the outside world. We’re can finally confirm what we’ve hitherto suspected – at this stage in his life, Stephen can be a really pompous jerk. He’s certainly a smart and charismatic one, but at times he’s an idiot nonetheless.
By the way, we don’t include Heron in this category because he doesn’t play the same role as Stephen’s university friends; he’s simply a kind of measuring stick for Stephen, as another smart, somewhat more savvy but less sensitive student. He’s the only equal that Stephen has at Belvedere, and if he showed up more, he might have been Stephen’s foil. However, as it is, he’s just another figure who shows us briefly how others perceive Stephen.