Agreed, I was focussing more on the not tactically advantageous, rather than ascribing an honour code per se.
It is generally a good idea to agree weapons beforehand, it helps keep the battlefield survivable. The 20th century wasn't known for it's 'honour' but WW2 combatants did refrain from using chemical weapons for example, and nukes were never used in the cold war and it's proxy battles. I'd label that as part of an honour code? I'm not making the case too forcefully though.
I wasn't thinking MAD specifically, although I'm aware of at least one example where Russian early warning picked up an incoming object that appeared to them to be a missile, and they didn't respond, which seems very un MAD. I was thinking of the proxy wars, Vietnam, Korea, etc. I'm not even sure the threat of nuclear attack was used. I suppose you could say that's part of MAD (not attacking allies), if that were the case, wouldn't the same reasoning extend to not fighting them in the first place, in the same way there were never any conventional wars between Russia and the US?
So agreed it is mainly about self preservation, but I would say it goes a little further than that.
Primary weapons were generally either bows or some kind of long stick with something sharp on the end. Primary weapons and shields are both inconvenient and tacky to carry when not expecting battle, so the sidearm becomes the badge of office or nobility for the warrior class.
I am not an expert either but as I understand it, Samurai were nobles and fought on horseback with their primary weapons being spears and bows, and they considered swords a backup weapon.[0]
The mythologizing of the Samurai, their honor-above-reason mentality ("bushido") and the katana as their primary weapon was a retrofiction created in the Edo period, when the Samurai had been disarmed and relegated to bureaucrats, and they wanted to justify and romanticize their violent past, and the term bushido was invented in the 20th century, and was itself based on Western ideals of chivalry in knighthood (which also, really, didn't exist.)[1,2]
[0]https://history.stackexchange.com/questions/10331/why-didnt-...
[1]https://www.tofugu.com/japan/bushido/
[2]https://news.ycombinator.com/item?id=11990721