I tend to attract people I'm compatible with but that are also quite different from me (different in terms of cultural background, home life, etc.). I've always been fascinated by people who come from different walks of life than me but they're not so different that we can't relate to each other.
I have also realized that I tend to gravitate towards nerdy and/or neurodivergent people. Probably because I'm the same way!