Erecting walls is never the answer. Any community, from a website to an entire country, suffers if it decides to close itself off from the world. There are too many examples to list.
Though you are correct that many communities suffer when they restrict membership, that isn't an infallible rule.
Communities that have benefited from restricting membership include the Freemasons, Mensa, and the online community TheRoot42. Those are just a few we know about! Many closed communities are also at least somewhat secret. Barriers to community entry are sometimes beneficial (not that I'm advocating it for HN).
Entry difficulty is a significant contributor to group cohesiveness (http://en.wikipedia.org/wiki/Group_cohesiveness).