Out-of-canon, the answer is pretty simple - the survivors select somebody and everybody gets down to business. If the groups can't merge their differences (like religion, for instance) they recognize the need for cooperation and maintain separate but cooperative identities. Boooring. The writers want conflict. If the groups got together to form a farming community, the show would last about 3 episodes. The zombies are dumb (although persistent) and an effective defense ought to be possible. Then it's just more of the same.