According to the Federation but NOT according to everyone else. They clearly see benefits to it.
Then point to ANY other civilization that can rival the Federation's technology, military prowess and standard of living. Any other civilization both as old and as successful as the United Federation of Planets not only in securing its own borders but in preserving the dignity, freedom and happiness of all its citizens. Any one will do.
Do the Klingons? Do the Cardassians? Do the Romulans? Do the Ferengi? Do the Borg? Do the Breen?
In every case you find the same thing: habitual conquest and intervention comes at a price. The Cardassian people pay this price by being menaced with generation after generation of Bajoran and Maquis terrorism, with an oppressive fascist government ruled by a military junta. The Klingons pay this price with poor medical services, outdated technology, corruption, oligarchy, and a social order that strongly rewards violence and duplicity to a far greater degree than competence. The Romulans' entire population lives in fear of their government and spend their entire lives looking over their shoulder for the Tal'Shiar, a population which meets its a climactic and explosive end in 2387 during the Hobus event. The Breen seem to be pretty happy with things, but their SLAVES sure as hell aren't. And the Ferengi, interventionist as they are, are pretty much the weenies of the galaxy and have never really been a serious military power (though they seem to be a big economic one).
You can argue principles all you want, but you can't argue with results. The only other power in the galaxy that even comes CLOSE to the Federation is the Dominion, and they accomplish this by virtue of their soldiers not actually having lives and their subjects not having to contribute to the military at all except in tax revenue. OTOH, the Dominion continues to exist now ONLY because of the benevolence of a couple of Starfleet officers who went out of their way to prevent the extermination of the Founders, so that basically makes them the exception that proves the rule.
Which again demonstrates that it's a worthless directive to the rest of the galaxy.
It's not MEANT for the rest of the galaxy.
As far as the Federation are concerned, they apparently made the decision based on learning from past mistakes but were those mistakes due to inteference or due to stupidity and lack of experience with space travel and other cultures?
No. It's based on the historical fact that one cannot and should not ever assume that a third party you cannot control will automatically behave the way you want them to, and recognition of the fact that both individuals and societies must be responsible only for themselves and their own choices.
That, by the way, is one of the reasons why an official request for help falls outside the scope of the Prime Directive and why Starfleet can and does render humanitarian aid when possible. It's why Kirk flash-freezing the supervolcano on Nibiru would NOT have been a violation of the Prime Directive had he been able to accomplish that without revealing the Enteprirse's presence to the natives. It's why successfully using the holodeck transplant refugees from Boraal II doesn't actually violate of the Prime Directive (although it almost DID when the holodeck started to malfunction).
The problem is, primitive societies aren't always in a position to make an informed choice about whether or not they are ready to open relations with other civilizations. Those who do not have a coherent concept of alien life wouldn't be able to make a rational choice AT ALL, and in those cases contact is best avoided. On the other hand there seem to be many primitive civilizations whose concept of "alien" is sufficiently well developed that the appearance of a starship off their favorite beach would be met with "Fancy ship. Must be foreigners. Wonder where they're from?"
Still an extraordinarily dumb analogy.
It was an extraordinarily dumb SUGGESTION. Just because a billion people do a stupid thing doesn't make that thing any less stupid.
We can examine the proposition on its own merits, not on its popularity.