Diversity generates complexity in the brain