If I've linked you to this page, it is my feeble attempt to provide a more convincing justification.
Ioften receive instant messages or emails requesting help or guidance at work or on one of my various programming projects.
When asked why they asked privately, the responses vary; mostly along the lines of it simply being an accident, not knowing where else to ask, as well as not wishing to "disturb" others with their bespoke question. Some will be more candid and simply admit that they were afraid of looking unknowledgable in front of others.
It is always tempting to simply reply with the answer, especially as helping another human is inherently rewarding unless one is a psychopath. However, one can actually do more good overall by insisting the question is re-asked in a more public forum.
This is for many reasons. Most obviously, public questions are simply far more efficient; as soon as more than one person asks that question the response may be surfaced by a search engine and thus referenced in the future. These time savings soon add up, meaning that simply more stuff can be done in any given day. After all, most questions are not as unique as people think.
Secondly, a private communication cannot be corrected or elaborated on if someone else notices it is incorrect or incomplete. Even this seemingly banal point is more subtle that it first appears — in an echo of John Stuart Mill's On Liberty, the lack of possible corrections deprives both the person asking and the person responding of the true and correct answer.
Conversations that happen in private are depriving others of the answer as well. Perhaps someone was curious but hadn't got around to asking? Maybe the answer—or even the question—contains a clue to solving some other issue. None of this can happen if this is occurs behind closed doors, and it furthermore prevents someone on the periphery of the project from contributing, adding a subtle and invisible barrier to entry.
Lastly, messages sent individually also quietly erode the institutional memory of the organisation. This "collective set of facts, concepts, experiences and knowledge held by a group of people" is not only essential to ensure that a group is resilient to changes in membership, it means that the current members do not feel obligated to stick around beyond a point that is healthy to them.
There are lots of subtler reasons too — in a large organisation or team, simply knowing what other people are curious about can be curiously valuable side-channel information. More importantly however, private questions place a silent and insidious burden on maintainers to reply, particularly problematic for people volunteering their spare time to a project or cause.
Note that this is not, as you may suspect, simply a way of ensuring that one gets the public recognition or "kudos" from being seen helping others.
I wouldn't deny that technical communities work on a gift economy basis to some degree, but to attribute all acts of assistance as "selfish" and value-extracting would be to take the argument too far in the other direction. Saying that, the lure and appeal of public recognition should not be understated and can certainly be leveraged positively to provide a generally superior response.
More philosophically, there's also something fundamentally "honest" about airing issues in an appropriately public and transparent manner. I feel it promotes a culture of egoless conversations, of being able to admit one's mistakes, and ultimately a healthy personal mindset.
So please, take care not only in the way you phrase and frame your question, but also consider wider context in which you are asking it. And don't take it too personally if I ask you to re-ask elsewhere...