Economists perceive moral hazard as an undesirable problem because it undermines efficiency. Carefully designed contracts can mitigate the moral hazard problem, but this assumes that a team is already formed. This paper demonstrates that these contracts are sometimes the reason why teams do not form. Formally, we study the team formation problem in which the agents' efforts are not verifiable and the size of teams does not exceed quota . We show that if the team members cannot make transfers, then moral hazard affects stability positively in a large class of games. For example, a stable team structure exists if teams produce public goods or if the quota is two. However, these existence results no longer hold if efforts are verifiable.