Steps to reproduce:
1. Apply the "Thorns" enchantment (any level, but I specifically experienced the bug with Thorns II) to any piece of armor (I had it on an iron chestplate)
2. Let a skeleton attack you
Unfortunately, I was not able to reproduce this consistently.
Environment
Java version: 1.8.0_144
Operating system: Windows 10
Care to explain how this "works as intended?" It doesn't make sense to me for it to be intentional, considering that skeletons attack using a projectile...