is this something guys do?
This phrasing implies that you value what the majority does. That if something is normal, then it is good. This is a natural feeling and reinforced throughout society, because conformity increases cohesion within a group which is giving an advantage over other groups with less cohesion, thus resulting in increased survival chances.
However, it is also a source of incredible amounts of pain and suffering, since how many people do something is not actually a measurement of truth. Since other ways of doing things might actually simply be objectively better, but not done because of this.
In our current world, it's not as important anymore because at any time, you can live "by yourself" or change friend groups easily. In older times, your tribe was all you had and there was no way to change it without a high risk of dying. But this is why we still do all kinds of shit to "fit in" even if whatever you fit into might be absolute bullshit. Participating in bullshit obviously sucks, as you just figured out.
In this particular instance, you were part of a behavior designed to establish a social hierarchy through competition and a bond through shared risky behavior. It's not only about the length of the penises, but also about your confidence and daringness among other things, but I don't want to spend the time to completely take this apart.
Essentially, this event is an attempt to shake up the social hierarchy. (Most of social events are.) It's a power struggle to achieve more optimal sexual personal outcomes. The exact form is not really important, comparing penises may be unusual, but the base purpose of the event, yes, does happen everywhere and is certainly "something guys do". These kind of events are part of the constant struggle to establish social superiority.
By being uncomfortable with it when the rest of the group actually isn't, you're essentially losing social capital. But it could also be a chance for you to gain social capital, if most of the people were uncomfortable with it, you voice your concern and the rest of the group agrees with you, causing the one(s) who had the idea to lose social capital. This is simplified and there are more possibilities and dynamics.
But yeah, so in effect you have to decide how important social capital with this group is for you, how uncomfortable you are with what happened, how competitive you want to be, how much risk you want to take.
You can ignore it, address your feelings about the event with your boyfriend or even the group, reduce the interactions with this group, learn to embrace and like this struggle, and probably many more ways to handle it.