The bug
Probably intentional, see MC-139433. Piglins that are given bows don't attack players, hoglins or wither skeletons. I would expect them to attack like how they use their swords.
How to reproduce
Set gamemode to survival
Type in the following command given:
/summon piglin ~ ~ ~ {HandItems:[{id:bow,Count:1b}]}→ ❌ "Piglin snorts angrily" appears, but somehow is not attacking.
Notes:
Unlike pillagers/illusioners, piglins can use melee even if the they have item that isn't a melee weapon or unarmed.
WAI, see MC-172470.