Lets say you have an Iron sword, which takes 3 hits to kill a spider, if you only press the mouse button 3 times to kill it, then you only loose 3 durability. If you are spamming the mouse button trying to kill it, any swings after you've killed will count as extra hits.
happens with any mob
happens with any sword
Related issues
Comments

Duplicate of MC-4732, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.