Why was Hammurabis code cruel?
The Code of Hammurabi was the earliest written legal system in human history, so therefore it was also necessarily less sophisticated than later systems, since it has taken a long time for the human race to ponder philosophical issues relating to crime and punishment, and to arrive at a more sophisticated understanding of those issues.