When an arrow hits an entity that is in its invulnerable state (when taking damage, an entity has 0.5 seconds where it is immune to all damage) the arrow itself dosen't deal damage, but it nonetheless applies it's tipped arrow effect to the entity it hit.
This can be replicated by summoning an iron golem, and with a regular bow, instant damage II arrows and a right click macro (even 3 cps is more than enough) and see how long it takes to kill compared to fully charged shots with the same bow and arrows.
This bug makes harming arrows almost work like stacked harming potions.
With crossbows its even more noticeable: use a multishot crossbow loaded with harming II arrows at point blank range; it will kill an iron golem in 2 shots and a fully armoured and gaped up player in only 1.
TL;DR : tipped arrows ignore damage cooldown when applying their effect
Note: this bug can also be replicated on mobile but it takes more time and effort