Before I was allowed to sit for my Commonwealth mate's exam, I was made to pilot the ships entering and leaving Port Moresby. I never had any trouble doing the job or an incident, but on my first day the pilot with me recounted a great story.
As you enter the port going north, with the pier to the west, you are bow to the perpetually strong (225 to 30 knots) prevailing wind, and make a big circle until you are headed south and your bow is pointed about 2/3rds of the way west on the wharf.
On one particular day, a few years earlier, the pilot was at the point he needed to swing the helm hard over to starboard and put the ship in reverse, so that ideally, she would stop just a few feet and parallel to the wharf. At that instant, the ship lost all power which includes motive and steering, so she plowed right into that wharf, nearly cutting it in two.
As the story is told, the captain was in a tizzy, almost literally tearing his hair out. He turned to the pilot and screamed, "What do I do now?" The pilot responded very calmly, "Put a ladder over the bow. My job is done!"
So, a point of fact, though in many places a pilot is mandatory, the master is still the responsible party and having a pilot aboard doesn't necessarily mean you are in good hands. I've always been lucky, but I still prefer to get my pilotage exemption whenever possible as soon as I can. My Orinoco (300 miles up the river) pilot was on his last ship of a 30 day duty and he did great, but he was exhausted and we had to keep waking him up.