While I agree with you that the taming system is ridiculously unclear, this:
Besides the rant, can someone explain me what happened and how to prevent it?
Has nothing to do with taming.
It's been my experience that animals will aggro you if you shoot an arrow anywhere NEAR them. I've shot at wild animals, missed, and they've still come at me.
I strongly recommend not using archery during the taming process. Multiple people can wail on an animal to win taming fights easily (just make sure they all remember to hit peace!)
BTW, taming is a mess for everyone, we've had cases of people misclicking attack and the animal going on a rampage, or of forgetting to hit peace, etc etc. So if taming is error prone chaos for you, grats.. you're on the level of most players now lol.