I actually don't concur with this analysis. onInitialSpawn() is also necessary for entities that are not backed server-side because it sets parameters that are needed for rendering, e.g. weapons, the child flag, head gear etc. The bug here is that the zombie jockey code runs before the entity is added to the world. Minecraft needs to shift that code into a new callback from world.onEntityAdded() instead.
The same applies to Thorns. Holding an item with Thorns on it in any hand damages the attacker.
Same root cause, just a neighboring method (Enchantment.onEntityDamaged()
vs Enchantment.onUserHurt()
).
A side effect of this is that it apples the enchantments for "main hand, off hand, head, chest, legs, feet, main hand". Notice how "main hand" is doubled up here...