There are definitely bugs with how far away ships think they should be from their targets.
I mean, probably?
Couple I have seen: ships hovering just outside of their own weapon range and ships backing off thousands of units for no good reason. What causes them? Who knows.
The actual shooting distance is one of the easiest things to figure out.
Is it? Devastator might not have a single shot reach max range. Rockets only inherit the velocity of their ship at launch, reducing their range when chasing and extending it when chased. Guided missiles (Atropos, particularly) launched sideways or backwards can have less actual range then their stated range.
I have seen each of those issues cause ships to miss repeatedly, wasting flux/ammo. I am sure there are many other cases where the "ideal" distance to stay at is not straightforward.