This is only a problem if you take the Protestant literalist approach. As Orthodox Christians though, there are two things to take into account when reading the Old Testament. Firstly, people had different standards back then. While the Mosaic Law may seem harsh to us now, it was actually quite advanced for its time, or at least equal in par to other ancient near east law--such as the Code of Hammurabi. And also, everything that happened in the Old Testament was so that conditions could be made for Christ to be incarnate. Second thing, we don't have to interpret everything literally--indeed, many Church Fathers didn't. Take Origen of Alexandria, the Ethiopians and pretty much the entire Alexandrian way of viewing scripture. Some stories could simply be typology and allegory representing how Christ relates to us as Christians combined with an exaggerated historical narrative from the authors at the time. It was always common back then for people to view their fate as being determined by God/the gods mood toward them, ie, I lost a battle therefore God is angry or I shattered my enemy therefore my God supported it and is on my side--we even see this on occasions with the religious-right in regards to conflict in the Middle East during this very day. So while most of these stories probably carry some historical value, we don't have to assume that it is ALL historical and need to remember that it was written in combination with allegory to represent Christ and in the mindset of the authors at the time.