A study found that rather than mixing at random, sharks have “active social preferences” and choose their social partners.