When an enemy is within their range, they fire forwards, regardless of what direction it's in.
When they are attacking a target, they aim correctly.
Do you mean the attack in formation order? Because if so, that's how it's supposed to work. It's not a very useful order, granted, but it's supposed to create a blanket of weaponfire in a single direction.
No, I meant the default behavior when launched or after a "form up" order. Editing the title to remove the word "formation".
Added example pictures with a Moskva 11 on an auton. In the first picture, I ordered it to form up. When the enemy comes within range it starts firing forwards, even though it's not facing the enemy.
In the second picture, I ordered it to break and attack. It aims its shots at where it thinks the enemy will be, regardless of which way it's facing. However, accuracy against moving targets is terrible. (This is an unrelated bug, I think.)
Fixed in 1.7 Alpha 2.
The problem was that the escort order was not returning the target appropriately (which means the fire routines could not aim).