I work in a good place. Most of my colleagues are competent, dedicated, and friendly. It is one of the reasons I am do not yet want to retire. Not everyone is so lucky.
Most people tend to go towards the mean. If everyone around someone is slacking, it is hard to be hard working. Similarly, if everyone around someone is working hard, it is hard for him to justify goofing off.
Given a choice of where to work, many people would choose to be in an environment where they are the best person there. Obviously this is how to get promoted. But if you are surrounded by people who are better than you, you are more likely to become better.
However, there is the risk you will be fired . . . .