The painting was probably done by an artist who heard a third hand account of how it worked. A simple claw on a crane that attempted to hook onto the side of a ship and flip it doesn't seem too out of the realm of possibility, but it does require that the ship to navigate extremely close to the device. So it's only useful against invasions where the ships are attempting to disgorge soldiers onto the walls, but since that's what the Romans were doing it's in the realm of possibilities.