The paradigm of P2P (peer-to-peer) economy has emerged in diverse areas. P2P energy sharing is a new form of P2P economy in the energy sector, which allows users to establish longer-term sharing arrangements of their local energy resources (e.g., rooftop PVs, home batteries) with joint optimized energy management. In such a P2P setting, a coalition of users is formed for sharing resources in a decentralized manner by self-interested users based on their individual preferences. A likely outcome of decentralized coalition formation will be a stable coalition structure, where no group of users could cooperatively opt out to form another coalition that induces higher preferences to all its members. Remarkably, there exist a number of fair cost-sharing mechanisms (e.g., equal-split, proportional-split, egalitarian and Nash bargaining solutions of bargaining games) that model practical cost-sharing applications with desirable properties, such as the existence of a stable coalition structure with a small strong price-of-anarchy (SPoA) to approximate the social optimum. In this paper, we provide general results of decentralized coalition formation: (1) We establish a logarithmic lower bound on SPoA, and hence, show several previously known fair cost-sharing mechanisms are the best practical mechanisms with minimal SPoA. (2) We show that the SPoA of egalitarian and Nash bargaining cost-sharing mechanisms to match the lower bound. (3) We derive the SPoA of a mix of different cost-sharing mechanisms. (4) We present a decentralized algorithm to form a stable coalition structure. (5) Finally, we apply our general results to P2P energy sharing and present an empirical study of decentralized coalition formation in a real-world project. We study the empirical SPoA, which is observed within 95% of the social optimal cost with coalitions of 2 and 3 users, via fair cost-sharing mechanisms.