I strongly suspect this was a test of the drones capabilities AND the capabilities of the ships sensors to detect and track the drones by defense contractors.
Very strong possibility. And senior officers onboard each vessel were told not to shoot them down, but to watch how their various response teams reacted.