At the time it was necessary.
elaborate
what's the point of the change? did you (as a christian in like 1 AD or whatever), all that time, believe that what you were doing was wrong, but did it anyway, because some book told you to? or did you think it was right, until another, similar book told you to stop doing that stuff?
and as a christian in 2016 AD, if the old testament no longer applies, why do you still read it to all your little christian kids? why even read it at all? more importantly, why do you still follow some of its rules?
and beyond that, it has some unpleasant implications, right? your god literally wanted his children to do bad things? being all-knowing, he must have known they were bad, and that he would eventually command them to stop. so, what? he wanted you to do bad things to "set Israel apart from other nations", whatever that means? it just sounds like an excuse to retcon the old stuff cus you realized how awful it sounded
another, only marginally related thing, but why do you trust the bible at all? man is fallible, and god didn't literally strike the words onto the pages himself (why not, by the way? he is supposed to be omnipotent), so how could you know whether or not it's really what god wanted?