In case you are the smartest person in the world, the advice is still a reasonable thing to do: How will you ever know you are the smartest-in-world if you don't try to find smarter people?
On the other hand, you'll probably never know for sure, as it is wasted effort to compare yourself with literally every other person in the world. So pretending not to be the smartest person in the world is a totally sensible thing to do even if you are.
So let's replace the notion of "smartest person" with something better defined, like "most successful at playing chess, as measured by their chess rating." In that case, we know who the best in the world is, it's Magnus Carlsen. It would indeed be a waste of time for him to seek chess matches where there was somebody better than him, but it is in fact good advice for everybody else to seek to play against better opponents.
However, the strongest players all find that inevitably, they are nearly always stronger than their opponents. For example, the #2 in the world, Levon Aronian, is stronger unless he plays Carlsen. Every grandmaster finds that the large majority of his games are against weaker opponents.
So if you're really "smart," it's good advice to try to surround yourself with "smarter" people, but don't beat yourself up if you find it hard to do--it's an inevitable consequence of mathematics that the "smartest" people will tend to surround themselves with less "smart" people, at least if you're only measuring "smartness" in one way.
If so, then please don't nitpick advice which is good for everybody else. Magnus Carlsen can do that for himself.
When you really are the smartest person in the world, and everyone knows it, you could seek out seek out students and teach them to be the smartest person in the world. I have heard it several times in different ways but the gist is this, 'If you really want to learn X, teach someone how to X.' I don't think the quote is exactly right but I hope the intent comes through.