What’s the reason hunters don’t automatically target boars?
Because boars are predators and really would you go after a boar with a bow and arrows if you didn’t have to? You can command hunters to go after them and they will attack boars if other villagers are being attacked.
It is built into the game, they will only defend others that are being attacked.
To get rid of them grab a few hunters and tell them to direct attack the boar.
They will attack and kill anything you directly tell them to to attack.
Also, If you have a recurring issue with them attacking your peeps.
i.e. They are close to an area your people are walking by a lot an easy fix is to just fence in the spawn. When they spawn they will be inside of the fence and will no longer cause you any issues.