Why would Gur care to ambush some magistrate? Their job is killing monsters, not corrupt nobles.
At some point during the game Astarion says
he made a verdict which Gurs didn't like and that's why they almost killed him
. I suspect he didn't lie but he didn't tell the whole true either. My theory is he was sentencing them and selling to Szarrs. One of MC's lines got my attention too; we can say that it's kind of suspicious that Cazador appeared exactly in this particular moment to "save" Astarion. This makes me think Cazador could somehow use Gurs to get him - but it also implies that he couldn't do this other way which is weird for a vampire lord. But I guess Astarion knew who was he dealing with (he HAD to know considering
he was selling prisoners to Cazador
) and secured himself against vampires, so the vampire had to use mortals.