I've entered the US from Canada (@ YVR pre-clearance) a few times with friends, and I've had the officer get angry with me for both situations.
1) Walk up alone, friend stands behind red line:
(Officer looks up at friend standing behind red line): "Are you two traveling together?"
"Yes, sir."
"Then why ISN'T HE UP HERE WITH YOU!?!?!"
(Friend hustles forward.)
2) Another time, walk up together, friend stands next to me.
"Are you two a family (sneer)?"
"No, Sir."
"The GET BACK BEHIND THE RED LINE!"
So it's really hit and miss.