Because the station was programmed to defend orbiting friendly system fleets... so they do what they designed to do..... Another Hal
No that is how they are coded, not necessarily how they were meant to work. If I attack a system fleet my own stations should never attack me. If I were to attack a friendly system fleet with another players friendly station I could see it happening.
I realize this is not exactly a bug depending on how Emi wanted it to work in the first place. It may be Sir Emi wants stations to attack their owners, but it could be that its an unintended side effect of how it was coded.