I summoned some pillagers (with spawn eggs) to see what is happening when they are fighting against hostile mobs. I placed some skeletons too, and a villager in front of them. The pillagers started shooting and they hit the skeletons (that's why the skeletons attacked them) . After the villager died, they started shooting the skeletons. And that's when the bug happened. They didn't changed their looking direction! A skeleton was behind them and the arrows just came from their (the pillager's) back!
I tried to take some screenshots, but that was wery hard (to capture the moment), and I think they won't help a lot.
(The daytime scrrenshots are against a witch, but you can see an arrow coming from the pillager).
I ran into thte same issue, just to back up your claim. Finally managed to get a screenshot too. The Pillager was targeting a panda to its right (offscreen).