The bug
Pillagers and piglins can hardly hit the mobs lower than a block with a crossbow.
Unlike MC-260003, the pillagers and piglins will try to aim downward, but the angle of aiming downward is still not enough.
Reproduce steps
Give yourself a pillager spawn egg.
Give yourself a piglin spawn egg.
/give @p piglin_spawn_egg[entity_data={id:piglin,IsImmuneToZombification:1,IsBaby:0,equipment:{mainhand:{id:'minecraft:crossbow'}}}] 1
Give yourself a baby turtal spawn egg.
/give @p turtle_spawn_egg[entity_data={id:turtle,Age:-999999}] 1
Spawning a pillager or piglin.
Spawning a baby turtle on the third block from the pillager or piglin.
Use the following command:
Pillager
/damage @e[type=minecraft:pillager,limit=1] 1 minecraft:generic by @e[type=minecraft:turtle,limit=1] from @e[type=minecraft:turtle,limit=1]
Piglin
/damage @e[type=minecraft:piglin,limit=1] 1 minecraft:generic by @e[type=minecraft:turtle,limit=1] from @e[type=minecraft:turtle,limit=1]
Found out that the pillager or piglin is difficult to hit the target.
Can confirm