For wikitree it also is based on surnames the testers have listed. The surnames I have listed include my Mom and Dads sides, but for my Mom's test, she doesn't pop up if she doesn't have that surname.
In one instance I was contacted by someone who shows as a 2-4 cousin match at FT and he didn't have many surnames listed. But when he looked at my wikitree he saw the close connection shared with my Martin line. It was a shared line neither of us were aware of. Small world!