James' pirate persona stems from a role he auditioned for in one of the Pirates of the Caribbean movies, when the producers wanted a music figure for a key role. The role famously went to Keith Richards, but due to a miscommunication, James showed up to set anyway and, mistaking him for an extra, the crew wound up doing makeup and wardrobe for him. James showed up to set in full pirate garb for six consecutive days, awaiting instruction before the producers realized he didn't belong. The ensuing lock down of the set delayed production and caused the cast to have to make up a day's worth of filming on a weekend. This caused great animosity between James and Orlando Bloom, who to this day refuses to listen to Octavarium past the line "sailing on the seven seas." It's just too painful a memory.
Probably how it happened. Maybe.