The guys who are nude exhibitionists in locker rooms is actually quite an intriguing topic, because I believe it could be fueled by any combination of the following factors:
A.) Many boys just love getting naked in a "safe" (fraternal) environment, especially before they hit puberty -- but even into adulthood, it's a healthy method of male bonding
B.) Some boys suddenly become intensely self-conscious when they begin growing pubic hair (others, conversely, wear/flaunt it like a badge of honor), so they no longer do the naked-strutting once that happens to them
C.) Other boys suddenly become more aware of their nudity at whatever point it registers in their mind that there are probably at least some gay boys sharing that same space with them, which could be another reason for one to cease the naked-strutting
D.) Some men might savor exhibitionism because they love the work they've done on their bodies, and they just want to show off for everybody (even if there are no girls/women around to try to impress, and it's only for other dudes in whom they have zero sexual interest)
E.) A lot of boys go naked out of convenience; they may not be showing off, but they're just desensitized to the condition of being nude in same-sex environments
F.) Some may be doing it in order to exert dominance...they know other boys/men are going to be intimidated or uneasy around nudity, so they engage in such exhibitionism in order to claim the locker room as "their" domain
G.) Some, as you suggest, could be trying to fulfill repressed homosexual or homoerotic desires in a manner where most of their peers are going to be too timid to confront/challenge them about it (aside from in a joking manner)
Where exactly John fell/falls on this spectrum, I can only speculate based on the limited information and observations I have.