Original: One is that sea-faring people believed that pilot fish, which would appear around the bow of their ships when they were close to land, were leading (or piloting) them back to port.
Simplified: It could be because sailors people believed that pilot fish were leading (piloting) them back to port, or even leading swimmers and whales to safety.