You'd think they'd have learned to avoid the gray ships with guns on them by now
Well nobody ever accused the pirates of being smart. In this case, the ship they attacked can, kinda, sorta, be confused with other ships (if you're blind in one eye with cataracts in the other and have the IQ of a bar of soap), like ocean going tugs, salvage ships, or certain kinds of large comercial fishing vessels.
ETA:
THIS IMAGE will show you the similiar superstructure form between an LSD and a Fleet Tug (tug is top most vessel shown), of course there's still the issue of the LSD being about 5 times larger than the tug.
Of course it would have been kinda amusing if they had made it on board. "Congratulations, Sparky. You and your twelve friends have successfully boarded a ship with 300 sailors and 500 marines on board. What are you going to do next?"
This is the ship they attacked....