Dogs might bark at ocean waves because they see the moving water as a potential threat or an unfamiliar object. This is a natural behavior as dogs possess an instinct to protect themselves and their owners from any potential danger. Your dog may get used to the waves over time, and the barking might decrease.