This is bit of a frame challenge.
In popular culture, we understand Stockholm syndrome as hostages becoming sympathetic of their captors, and defending their actions even after the fact. I'm going to explain my understanding of the genesis of this syndrome because I feel this is important to the point, and also it might cause someone to learn something. Feel free to skip it, or to do your own research and come to your own conclusions.
The concept was coined by criminologist Nils Bejerot as the "Norrmalmstorg syndrome", after the name of a square in Stockholm where in 1973 a bank was robbed. 4 hostages were taken by one man with a second man joining later, and 5 days later were released after a police assault and all was well. Ish.
Kristin Enmark, one of the hostages, was the object of that diagnosis. She was allowed to call the Prime Minister and pleaded for him to allow the hostage takers to walk away. Later, Enmark criticised the authorities that freed her, and she refused to be carried out on stretchers, insisting on walking out instead. She didn't appear traumatised, but rather "fresh and alert". Bejerot offered the explanation of this syndrome. Enmark also notably declined to testify in court against her captors, which furthers the hypothesis.
But it's very important to note Bejerot didn't speak to Enmark before diagonising her with this new ad hoc "Norrmalmstorg syndrome". On the call with the PM, he told her that "you will have to content yourself that you will have died at your post". Police used tear gas despite threats by the hostage taker that he would kill the hostages if they used gas. Meanwhile, Enmark at least wasn't physically harmed by the captors.
The most favorable framing, I think, is that Stockholm syndrome is an unexpected reaction to the trauma of being held captive under intense stress and fear for one's life. This in turn begs the question: What is the expected reaction and why is it expected? Little research has been done on the subject of protracted hostage situations, fortunately owing to them being too infrequent, so I think it would be unwise to make generalisations about it and that it's dubious there is much to learn from Stockholm syndrome scientifically.
A different framing is she was a woman in the 1970s and she didn't react victim-y like she was supposed to. That was sufficient to come up with this Stockholm syndrome on the spot without needing to question the actions of the good guys further, like it was just some case of female hysteria.
The point of all of that is, in my opinion, Stockholm syndrome is rubbish. It's a popular concept that has no basis in reality. We know these days there is no one standard way people react to trauma. Stockholm syndrome was coined in response to one event, to (wrongly, no less) explain the immediate reaction of one hostage in one unique circumstance.
I'm afraid there is no such thing as a single reason that can neatly explain why any and all people from a variety of walks of life would fall in love with the pirate way when their freedom is forcibly removed, so your question doesn't really have an answer.
What you can do in your case is easily explain why people don't leave: because they just can't. A remote, uncharted island in the middle of a vast ocean is extremely difficult to evade if the pirates take away their ships, maps and instruments. You could let the captives to roam freely on the island, and they might very well try to build a raft, and they'll most likely never to be seen or heard from again because they'd be dead on the ocean. That would disincentive others to try.
The pirates don't have to do a thing except welcome those that wish to join, because then the choice is live on your own or with other captives, live with the pirates and all the luxuries that they have, or probably die the high seas. Those that decide to live with the pirates might eventually join them in piracy, especially if they're given status among that group. They might convince others to follow suit. And if they escape or are freed, they might appear as completely converted to the pirates' cause.
But from a certain point of view, that's just making the best of it. You're stuck on an island, your past life is effectively out of reach. If you accept that circumstance as an irrevocable fact, joining the pirates is the best, and approximately only, opportunity you have for a better life. It either gives you access to a ship that can be used to escape, or gives you something to do with your life beyond simply surviving and perhaps reclaim some of the wealth and status you previously had.
You, the author, will have to make some concessions that not everybody will accept to follow the pirate life, yo ho, yo ho, and you'll have to resolve what happens to these people. For those that do choose to follow the life, they'll realistically have different reasons for doing it, because they're simply different people. And if they somehow find their way back to their previous lives, then you can have some guy talk to the press dismissively about their experience and brand them with the Stockholm syndrome all you want.