Some, if not most, car alarms have shock and motion sensors (ever heard a car alarm go off when a big truck passes by?). Cars are usually left on solid ground and any lateral movement when at rest is typical of a thief trying to gain entry. The rocking of a boat on water is lateral movement and could set an alarm off.