It seemed to me that declaring war against another country you wish to invade is just a really stupid thing to do. It's like telling someone that you want to murder that you are gonna shoot them (thus giving them time to run or fight back).
Of course there might be a few problems, B:"Why are you amassing your army beside our border? You dare go to war with us?" A:"Nope, we definitely not going to war with you, we would have declared war if we wanted to." The element of surprise would definitely be lost if the enemy finds a large encampment of soldiers outside their border but if it was planned well, it could be a devastating invasion where B was unable to mobilize their soldiers well.
This is also assuming that there were no international laws that prohibits both the threat and the use of force in international conflicts, which have made declarations of war largely obsolete in international relations in the modern era.
A declaration of war would be needed to raise troops. Before the modern era, there weren't standing armies in most countries. You had to pull labor off of crops/cattle and make them an army specifically for a war. And if a king didn't have his own resources directly, he'd have to levy troops from vassals. All that takes time, and you need your allies to know the enemy to help persuade them to fight.
Moreover, a surprise attack with an army is damned hard to do anyway -- armies move slow compared to messengers on horse. Surprise attacks are for units, not armies. It can be done, but (my opinion) the improbability of success probably makes the advantages of the declaration of war worth the loss of surprise.
If, however, A is seen as excessively aggressive, and attacking B simply because it can get away with it, that poses a substantial threat to the security of all the other countries--if they let A take over B, A is likely to remain aggressive and after a few years of assimilating B's economy is likely to be considerably larger and more powerful as well.
Unless C through Z feel insulated from A's aggression (e.g., even A + B is still too puny to be a threat, or A and B are too isolated to threaten others) they're likely to consider A making a sneak attack on B a good reason to join the fight--and even if A is extremely powerful, the combination of everybody else is likely overwhelming.
Keep in mind as well that even if C through Z are relatively pacifistic, there's likely to be at least some "hawkish" element in each that would welcome an excuse to invade A and get access to its resources. As such, even if A's attack on B leads to little real concern, it's still entirely possible that others will use it as an excuse to invade A anyway.
Bottom line: "international laws of war" (or anything similar) are largely a codification of preexisting behavior. Unless A and B are the sole powers in existence, the basic forces that have led to passage of those laws will be at work, and push toward (at least roughly) similar behaviors.
Yes you do get an advantage, but at the cost of being branded as a person using dubious means. Back then im guessing the norm was to declare war, thus doing a sneak attack will raise eyebrows of neighbouring countries.
Another potential impact is the respect and faith of your country citizens, similar to the vietnam war incident America faced, choices made by a nation that is not in favour with its citizens can lead to internal conflict. This puts a real damper on the overall war effort.
Launching a surprise invasion is almost completely impossible. More so the closer you get to the modern era. People tend to notice when large armies gather, or pick up on communications signals. Villagers flee to get out of the path of the army, they warn others. The message just keeps going. Eventually it reaches someone that can do something to confirm the rumors and respond. Thus, surprise is lost. All this can happen very quickly, but you can not gather an army quickly, and even with modern equipment you can't move an army all that quickly. The logistics just make it impossible.
The 'declaration' isn't usually as simple as sending a message saying "We're at war". Usually it would likely boil down to nation A making demands of nation B, and being refused. After that, a military build up tends to make things pretty obvious.
Additionally, as mentioned above, if you suddenly lash out without a clear justification, your own people will be very unlikely to support it. Which (Even in a feudal society) has very serious consequences on your efforts.
War follows certain conventions, and breaking some of these conventions carries a risk of labeling you as a bad guy, which can reduce your prestige and it can also reduce popular support from the war, which threatens the leaders' power. For example, when the US recently attacked Iraq it's known that they did spend quite some effort to forge evidence of WMDs, to give them a just cause for starting the war. One reason they did so was so they wouldn't be labeled as warmongers, which would cost them prestige and popular support.
Aside from prestige there's the equally important aspect of allies, and popular opinion about the war in neutral countries. Consider that leaders of other nations may want to join the war on either side but can't do so because public opinion is against them - if they joined the war anyway, they would lose a lot of prestige, just like Tony Blair did. By transmitting the image that your war is a just war, you make it easier for other leaders to join your side of the war and harder for other leaders to join the enemy side of the war, without them losing public support in their countries - which will directly threaten their power.
You'll notice that not a single one of the above is universal, and each depends on where and when the war took place. If you look at history a little bit more, you'll also notice that there are examples where each of these were broken, during times when it was considered bad form to do so. This was done because the perceived benefits outweighed the perceived cost. Sometimes that perception was right, other times it was not. Consider the last time the Crimea changed hands - there was no war declaration, there wasn't even a war, yet soldiers invaded, took the country, and countless conventions were broken.
Last but not least, as long as you pretend to follow the conventions, you can hope that the enemy also follows the conventions. When the convention was that peasants on the losing side are slaughtered and nobles are ransomed, as a noble it was a good thing for you if the enemy followed the latter part of that convention.
Honor was important in pre-modern society, certainly more so than now. Also, in societies with more absolute concentration of power, the ruler was synonymous with the country. Wars between countries could be more accurately seen as wars between kings in the pre-1500 world.
Now the fights didn't really go honorably at all, what with all the pillaging and bribing nobles to switch sides, and murdering each other's peasants. But it was more important to maintain the fiction of honorable battle, and that was done by establishing a causus belli, at least in Europe. In other parts of the world, you see the same process, rulers would send notice that, "Hey, bro, I'm coming to take all your money and women, and then force you and everyone else in the world to acknowledge how powerful and awesome I am."
You cannot analyze a war if first you don't identify all parties that have an advantage from that. As you see there are reasons for which friends may be at war and enemies may be at peace. That what is weird about economics and most people just don't realize. After all rarely do nations leaders die, most times just civilians and soldiers die.
Your assumption here is that countries just start a war because "they hate each others' guts", but that is usually not the case. Sure, there might be emotions and personal relations involved, but in the end, you usually want to achieve a goal by waging war. Depending on the era and other circumstances, this can go from raiding for resources to conquering land to showing strength and improving your political position.
You usually do not want to go to war on your own, you want to achieve a goal and for that, you need to give your own people and your allies a justification, maybe even a motivation they can get behind. Also, even in a big war, you usually do not want to slaughter every last enemy citizen. In the long run, you want them to work for your economy, one way or the other. You do not want to give them too much reason to hate you and cause rebellions for decades.
In most democracies, it will be frowned upon when the government just declares war spontaneously, and other forms of government might not be happy about it either. Breaking the rules also tends to deteriorate your relations with other states, even your allies, who now have to be suspicious what crazy plan you come up with in the future.
Also, as others stated, it gives your enemy a chance to negotiate, especially when you appear stronger (which is usually the time you would chose to declare war) and have an opportunity to achieve your goals without actually fighting.
Many countries, especially democracies, require both in law and social norms for a public debate to occur before going off to war. A ruling party or coalition government that hoodwinks the general population and sends its people to war without "selling" it to the general public first is not likely to survive re-election unless the war is a quick and resounding success.
In addition, if the executive branch of government has the supreme authority of the armed forces, as in America, then troops can be sent on the president's whim. However, the legislature often controls the budget, and if the executive decides to declare war unilaterally, the legislature can slash the budget for the armed forces. This almost never happens, because it looks bad politically to cut funding for the military during wartime, but if the war is largely seen as illegitimate and unpopular by the general population, then the legislators who cut short the executive's military incursions would have much to gain by standing up to an act of tyranny (which they will use to characterize the executive's actions, if they have any propaganda sense whatsoever).
e59dfda104