Why is the sun hot? Because it has a high temperature. Drop it and move on.
The SRD states: "When making a melee attack, you get a +2 flanking bonus if your opponent is threatened by a character or creature
friendly to you on the opponent’s opposite border or opposite corner." (emphasis mine)
It does not say "your ally". It does not say "your foe". "Friendly" is defined in the SRD as "Wishes you well" and willing to "Chat, advise, offer limited help, advocate". It does not mandate that the creature is helpful to you (i.e., your ally who "Will take risks to help you" and "Protect, back up, heal, aid").
Your supposed "ally" can certainly be "friendly" to your "foe".
RC