When editing any nbt data from a skeleton, their player pathfinding resets and they can't attack. This can be seen if doing:
data modify ...
in a loop.
I've tested with:
Health, HurtTine,ArmorItems.
I could only observed this with skeletons strangely.
https://bugs.mojang.com/browse/MC-66943?focusedCommentId=188032&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-188032