Factors enabling specialization and diversification