The receptors have these floppy loops which are great for bending into the right conformation to recognise different things. It turns out that if they have a few aromatic residues they just happen to recognise carbon nanotubes. It’s unlikely this is something that evolved, and much more just some bad luck in recognising this particular shape.