P2P is optimized for low cost distribution of large files without a centralized point of failure.
GitHub, Google Code, Youtube or plain old commercial hosting all have significant operating expenses in terms of servers, bandwidth and people power, thus they all require a business model to derive revenue from their content, either directly or indirectly (such as advertising). If youtube where to suddenly go bankrupt, that content would suddenly disappear from the internet. With P2P the costs of hosting are equally distributed among the userbase and in practice will soak up any spare capacity in network (which ISPs don't like as it doesn't fit in with their all-you-can-eat business model).
The inherent assumption is that anything worth sharing online is capable of generating a business model capable of covering its hosting expenses, or is deemed important enough to have a philanthropic donor to pay for it. Also a single point of failure assumes that you want to exert a high level of control over your content and are not subject to attacks from entities (governments, corporations) who do not wish you to share specific content.
So what remains is mostly content that is unable to generate a business model through its online distribution (Linux ISOs) and content that others are actively seeking to remove from the internet (Copyrighted Music and Videos + Wikileaks backups).
What would be the operating, server and bandwidth costs of hosting the full contents of The Pirate Bay on a centralized server? Maybe the internet giants like Apple or Google would have the modern day resources to physically achieve this, it would require a global CDN (like Youtube has), a multi-million pound operating budget, thus requiring either subscription charges or huge quantities of advertising, and would subject its owners to a huge multitude of legal issues, and the business interests of big media would ensure that it would be almost impossible to create such a service. With P2P we bypass all these restrictions and remove our dependance on the good-will of large corporations.
Without Napster pushing the boundaries and showing what was technically possible, big media would never have been forced to agree to iTunes (which tries to play by the rules, but at a cost)