The quote originates from The Social Network (2010).
Exact line (spoken by Sean Parker, played by Justin Timberlake, to Mark Zuckerberg, played by Jesse Eisenberg):
"If you're a good person, you'll surround yourself with smart people who disagree with you."
It emphasizes the value of constructive challenge and diverse perspectives.