I’m not entirely sure if this theory can be considered canon, but I think that the ammonite uses the pheromones as a psychological convincer to any random creature to defend it.
That’s just a theory, a GAME THEORY!!!
Don’t even think about hitting it. Just don’t. If you accidentally hit it, just swim away as fast as you can. I was out hunting for ammonites (I didn’t know what they did back then) on my basilosaurus. I saw one and hit it. I watched in horror as the whole ocean came swimming at me. I swam back to the surface, only to realise, a Tutsi was chasing me. It knocked me off my basilo and it tried to kill it. Luckily I had scuba gear. I got the gear on, whistled passive and put it to follow. The stupid tuso chased me around the whole map and now it is right next to my base. My basilo is stuck on the other side of the island. All because I hit an ammonite.