I spent a few years driving submarines. Typically, the small ones (SSNs) train to pull in and out of places without a pilot, and moor without tugs. It's nice when you can get a local pilot, but they're not strictly necessary, really more of a liability issue. You know, "We ran aground, but we were following the pilot's recommendations, so the captain only goes to jail instead of getting shot before going to jail."
I assume the same is true in the commercial world, except with more of an emphasis on the financial aspect. Hiring a pilot probably has some quantifiable impact on reducing the risk of collisions and groundings (insurance types have any numbers here?), but the cost is significant. I bet some wonk has set the price of a pilot to be proportional to the risk reduction percent times the potential loss in the event of a collision or grounding. ... Or at least, that's how it'd work in an efficient market, right?
Cool pictures.