It gets wierder.
Did some testing.
I had the enemy sit on the other side of the WP.
My ships were faster 13 vs 12.
On the next turn, my ships shot first.
Tested this a number of times and my ships always shot first.
Messed around and added some 12 movement ships to the fleet.
They shot first.
Went back to 13 movement ships and they shot first.
I suspect the defendor normally shoots first when sitting on the WP, but a random element sometimes gives the aggressor the right to shoot first when they are faster.