In a black and white world, with no shades of gray, every single war would be a "Just War".
Either the attacker was justified in attacking the target because they were a viscous, evil, nazi/slave owner/raping/ etc. monstrous country, - or the defender is justified in defending themselves against the viscous, evil, monstrous invader. Either way, one side is in the right, making it a just war.
But the real world has shades of gray (not to mention glorious colors). As such, you have situations where one side does some vicious things that are not quite as worth invading. That, pretend for a second that a country's evilness could be measured to a tiny level. At 10, they are evil, and invading them is just, at 0.00, they are saints, and defending them is just. At 10 or 0, the answer is obvious. Even at 9 or 1 , it is obvious. Around 8 or 2, and a tiny bit of doubt creeps in, but the the war is just. But at 5, neither side has a just war, nor at 6 or 4. You could make an argument about 7 or 3 either way.
Most people recognize that World Word II was a just war. Germany and Japan, did some horrible things. Let's ignore Japan, and do some re-writing. (Germany was a clear 10, on evilness, while Japan was closer to an 8.5.)
What if Germany did everything except invade other countries? They still rounded up people and sent them to concentration camps, but did not invade Austria, Poland, France, etc. Would that be enough to justify invading them? There are several countries like that today. They probably would be around 7 or an 8 then.
What if they invade other countries, but didn't do the concentration camp? Well, it's hard to do that as your occupied people revolt. But let's say you managed to do that. It might be possible if you picked your war carefully - like say Turkey invading Syria. That would make them a clear 8.
The truth is rarely black and white, it is a world of grey. Therein lies the problem. When your country does something evil, but not as bad as war, then invading it is not just, but neither is defending it.
Worse, when dealing with shades of gray, by definition there is no clear line demarcating anything. You can't say "They measure 7.4 the evil scale, so it isn't just to invade, but if they hit 8 , it suddenly becomes just."
It is a gradual thing. Which means there are not only "Just Wars", there are also "mostly Just Wars", and "kind of Just Wars", as well as "Not Just War."
In my personal experience, the current conditions in North Korea have pretty well demonstrated that the Korean War was a just war. Their government continues to act in arbitrary and monstrous manners - recently they killed 30 dissident officials and pretended they died in car accidents source,
But , the state of Vietnam right now means the Vietnam War was NOT a just war - on either side. Since 1986, Vietnam has slowly abandoned communism and moved towards a socialist oriented market economy. But it is till a fairly dictatorial country - albeit a relatively benevolent dictatorship - and has avoided the insanity that still grips North Korea. As such, their government, although not democratic is demonstrably only a bit evil. Which means neither their attack nor defending against them was truly a Just War.
But part of the issue is we could only really tell both of those things through the benefit of hindsight. It was NOT obvious back in 1950's that North Korea was far more evil than North Vietnam. They looked, talked and acted quite a lot alike, at least to outsiders. They both embraced communism, they both embraced one party dictatorships, they both were supported by China and the USSR.
It is very hard to judge the minds of men - to see if they are reasonable or unreasonable, particularly when fools continue to think that they can get more by claiming to be unreasonable. When people think they can get more by being unreasonable, they are shocked, and appalled to learn that your opponent refuses to give them anything at all. (i.e. GOP congressional gridlock). In the case of war, they are shocked and appalled that you dared to invade them simply because they said they were going to conquer you. That was the rhetoric of communism back in the 50's and 60's.
Which brings us to the next question - what if the country portrays themselves as an 8, but is actually just a 7? Would attacking them be a just war? They are still a 7 on the scale of evil. The country that attacks thought they were taking on an 8. This is at heart what the US did during the second Iraq War. Iraq said they had more weapons of mass destruction but they didn't.
This situation is not new, countries have been lying about their intentions and capabilities for millenia.
But it is also a core reason why we have 'unjust wars'. It is too hard to judge exactly how evil people are.