Eastasia and Eurasia have both, at times, been at war with both other nations. Oceania, however is always at war with only one. Why is this so?
As the meme says, "that's the joke".
To quote directly from the book,
In the writings of Emmanuel Goldstein, we find some additional relevant information;
We don't really know if it has ever been at war with either if them. We don't even know if Eurasia and East Asia are two countries - or indeed if Oceania includes any more than just Britain. The point of the book is that the Party's power is absolute, and we simply don't know anything other than what they tell us.
It is probably just a coincidence.
According to Emmanuel Goldstein's book, there are only 3 political entities on Earth in the year 1984 in the book 1984. I will call them "countries" here, but they are more like empires or conglomerates. I'm not sure if we are ever told the explicit term for them, even in Newspeak.
These 3 countries are always at war with each other. The 2 times we are told which side is which, Oceania, Winston's home, is allied with Eurasia against Eastasia at first, then it switches sides to be allied with Eastasia against Eurasia (maybe those 2 are switched, I haven't read the book in awhile).
We don't know whether Oceania ever aligns itself against both countries at once, but it could have. The war has been going on for 25 years, according to Emmanuel, and it will probably go on forever, or at least a very, very long time, and with the Party constantly rewriting history, not many people would remember years later even if it did happen, and would have almost no way of knowing when alliances changed before they were born.
My point is, we only ever see 2 examples of the alliances in this war, and the book only lasts probably a couple months in what has, according to the most reliable source we have outside of Winston (which isn't saying much), already been a 25-year-long war and which may never end. Winston never says for sure any other times when the alliances shifted, probably because he doesn't remember and can't look the information up - even if he could, he knows it wouldn't be accurate. You seem to be trying to extrapolate from 2 examples to an entire endless war.
If you want to see the relevant quotes, @Richard's answer has some.