It might be connected to your landclaim.
But I am not sure, I got attacked multiple times right in front of the door of my base, with landclaim around. No Werehyenas appeared inside for me though.
It’s completely randomized, another thing I hate about it. The frequency and chance of them to spawn around at night should be higher (similar to spawn chance of Maelstrom monsters on Siptah during Maelstrom event).
Sadly they spawn randomly and in low numbers (only one hunter per ambush), and in addition they drop insignificant number of fangs.