I read somewhere that they were exploiting some sort of maritime-related loophole, although the article didn't get into the detail of what said loophole was.
UK employment law is entirely irrelevant here, only international maritime law applies.
All the routes are contracted by the UK government. I'd say the government should have reviewed the contracts back in 2019 and done something to ensure the UK based staff are protected. But as we have observed the last few years the government has been rather distracted and incompetence at the same time. And now the horse has bolted.