Diversification of life and career

If the best investment advice is to diversify and not put all your eggs in one basket, then why should one’s career be circumscribed into just one path? That seems like something that’s more likely to end in failure than service, compared to learning talents that’s helpful in several fields.