It seems in the ancient world, life was disposable and no one seemed to care if a person died unless they were a king. What are the reasons for this? Due to the high infant mortality rate and lower life expectancy I would think that they would value life more, but the idea that they would swarm into besieged cities and rape and kill as they see fit is disturbing. Has there ever been a situation where a general or nation decided "Murdering and raping all these defenseless civilians is honorless and horrible, so I will not do it"? Sorry for the two part question.
This is a fascinating, complicated, and to my mind largely unanswerable question. There are innumerable answers to it, from the conditions of the ancient (pre-modern) world "brutalizing" people, to a vastly greater degree of control over actions modern states can enforce, to the rise of universality ideologies, to greater abilities of communication. One problem is that questions like this are invariably wrapped up in questions of "the origin of war", which in turn are invariably drowned out by evopsych drivel (classic tells: mentioning chimps but not bonobos, pretending the Chagnon's Yanomami are analogues for paleolithic hunter-gatherers). This is not to say that there isn't a good biological perspective on this question, just that, by and large, "good" isn't what is being offered.
That being said, yes, from a historical perspective there are plenty of examples of armies capturing cities and not destroying it. In Roman civil wars, for example, cities were frequently captured without being sacked. I would say that by and large sacking was a strategy deliberately conducted rather than a natural outburst of violence, but this is by no means always the case.
What makes you think that this does not happen in the modern era, though? Napoleon's wars caused up to 6.5 million deaths - wars fought mainly at the whim of one man. In World War I, generals hurled their men into no-man's land in the full knowledge that likely tens of thousands of them would die in each wave before even reaching the enemy lines. What about the Holocaust? What about the bombing of Dresden? Or the use of the atom bomb?
And, even later, we have numerous genocides and near-genocides. The United States stood by while Pol Pot massacred something like a quarter of his own people, because he stood in opposition to the Soviet-backed Vietnamese. Today, we need only look to Iraq and Syria, where ISIS' attitudes about the value of life would seem extreme in the Dark Ages.
So, what makes you think modern civilisation places greater value on life that ancient ones? The evidence simply isn't there.
Little bit late to the party but here it does: When Hong Xiuquan the Taiping Revolution leader conquered Yongan he feared that his troops and new members of his army would sack the city. He didn't want that because he wanted people to be on his side. So first thing he did was issue an edict stating: "An order to officers and soldiers of all ranks in each army corps and battalion: All of you must think of the public good, not of your private interests; and with single-minded determination cleave to your Heavenly Father...From this day on all soldiers and officers are ordered that, every time you kill demons or capture their cities, you must not hoard away for yourself the gold and valuables you find, the silks, and other precious objects, but must hand over everything to the sacred treasury of our Heavenly Court. All violators will be punished."...the Taiping leaders spread the word that they have no desire to harm the people...
Source: Jonathan Spence, God's Chinese Son