I don't think it is that simple. On the one hand, being told that you'll end up in hell, that you are worthless, etc... (which was part of the experience for some gay men 50 years ago) is damaging to one's sense of self. On the other hand, being considered sexually attractive, having people feel lust and desire in your presence is, generally speaking, an ego booster, at least in a sex positive environment. I would believe that, at least for the most attractive people, the net effect was positive and served to reinforce a sense of community, as the positive message came only within the community.
Obviously not everyone is attractive and the effect was probably overwhelmingly negative for people shun by potential sex partners. But that is not exclusive to gay men. A large proportion of people rarely find a sex partner, if ever.
But I don't think that pride walks are about sex, even if the imagery makes it appear so. It is difficult for me to say, but it seems that they are more about fostering a sense of community. In that sense, and as bizarre as it may appear to use westerners, they are more similar to football matches or religious processions.