Are there theories that invalidate the "tragedy of the commons"? Wikipedia states:


  The tragedy of the commons is an economics theory by Garrett Hardin, according to which individuals, acting independently and rationally according to each one's self-interest, behave contrary to the whole group's long-term best interests by depleting some common resource.


Intuitively, this seems correct that self-interest would lead to over use under the assumption that others would do the same.

Have there been any strong counter theories that argue that people would act in a "sub-optimal" way for the betterment of the community?
As you implied, the tragedy of the commons was the standard theory in Economics. This is no longer the case. However--and this is an important point--rejection of this one-size-fits-all approach to public resource management did not come from the emergence of new theories; rather, it resulted from actually studying real-world outcomes. In fact, it's for her work doing exactly this that Elinor Ostrom won the Nobel Prize in Economics. As described by the Nobel committee:


  [B]ased on numerous empirical studies of natural-resource management, Elinor Ostrom has concluded that common property is often surprisingly well managed. Thus, the standard theoretical argument against common property is overly simplistic. It neglects the fact that users themselves can both create and enforce rules that mitigate overexploitation. The standard argument also neglects the practical difficulties associated with privatization and government regulation.


Since these case studies there has been theoretical work--some of it by Ostrom herself--in order to reconcile the discrepancies between the previous theory and the observed outcomes (developed using the theory of repeated games in Non-Cooperative Game Theory). 

However, what's most interesting to me is that this theory was rooted in actual observations and not the other way around (i.e. first the theorized behavior followed by real-life observations).

Did this answer your question?