Evolutionary rationale behind migration proteins
This would be a very long answer but just to give you some hints, the migrational mechanisms are already there and the cancerous cells makes use of them to metastasise. So in short its deregulation. What is under selection pressure tho are cancerous cells themselves to constantly change and evade cellular fail safes which kill (apoptosis) uncontrollably replicating cells. You can find out about this here (http://www.nature.com/onc/journal/v22/n42/abs/1206757a.html)