Probably just human error. Boats don't have air traffic controllers like airplanes do. There are rules of the road, so to speak, to let boats know what to do in various situations, but mistakes get made every day. The guided missile destroyer definitely has collision avoidance electronics. The container ship may or may not have, but even standard marine radar systems usually have software that calculates trajectories and alerts operators when they're on a collision course.
These are big ships that can't really turn on a dime. People maneuver past and along side each other in crowded hallways and on sidewalks all the time, but every now and then mistakes get made. You're walking toward someone on the sidewalk where you both move left, then both move right, then you bump into each other. When ships do it, it's in very slow motion, and with a louder crunch when they bump together. That's probably what happened.
Boats run into each other all the time. Minor incidents happen somewhere out on the ocean probably once a day, with the more serious collisions like this one happening a few times a year.