What happens when armed pirates board a manned ship? The crew is unarmed and is supposed to lock themselves in a secure room, which is exactly the same as a computer would do.
The unmanned option is better in case of piracy, since due to lack of hostages there is less pressure for ransom and it's safer to re-capture the ship before it can be delivered to a pirate friendly port.
The real vulnerability of unmanned ship is against small-scale theft (a rubber dinghy boarding, opening a container and stealing a few TVs), but for large cargo ships thieves can do the same without the crew noticing; so it can be covered by insurance probably.