I've had the never appearing when I have sevreal planets and a very low social spending. It is like the money is first alocated to planet 1 then 2, and when it reaches the less productive planets, there is nothing left. It seems to me it has been this way since GC1 and therefore is not a bug
As for the AI attacking, in my games it has attacked me a lot and often. And probably accepted money to attack me as well ("we don't like your enemy, but we like their money" message). Mainly by the drengin, yor and korx