During the last few years I have slowly come to a conclusion: the reason for a lot of Biblical laws is not actually religious (as in, God has decided that something should not be done and that's that); it is the fact that non-religious commandments would have required explanations beyond the Jews' knowledge at the time or at least that they would have not obeyed them for long otherwise.
Take incest, since it does make for a rather glaring weirdness. Most people - an overwhelming number - consider incest to be "yuck"... the term cannot be discussed in polite company, only among porn freaks. When people ask "who did Adam and Eve's sons marry?" and receive the obvious answer "their sisters", they go "that's disgusting".
And yet... incest was not forbidden for a long time in the Bible. A quick search on Google reveals this page where we can see that Abraham married his half-sister, Moses' father married his aunt, and even when incest started to be prohibited it started with father-child relationships and only later were siblings added.
Why is this? Well, why are incestuous relationships prohibited today, even for non-religious people? As it happens sometimes, the state actually has some sort of justification here: people seldom pay attention to reproduction until it's too late and children between close relatives will have a much higher probability of genetic defects. So, since prohibiting only the "having children" part is difficult and would require genetic testing for each birth - and then, what do you do with an "illegal" baby? - the state found it much easier to prohibit the sexual relationship altogether.
Now. Genetic defects. What exactly would be the way to explain that to a tribe of Jews five thousand years ago? How can you tell them "if you do this, in the long run (generations) your tribe will die out"? Well, making it a religious commandment would be one way :)
If that is the case, why wait a few thousand years? Why not start prohibit this right away? Well, the reason is very likely the catastrophic diminishing of the gene pool at the Flood. Prior to that we have no way of knowing how good the genetic material was, but we can safely bet that the eight saved people on Noah's boat were not the most perfect specimens - and even if they were, it would still be too small a population. Which meant that genetic defects would very soon start to propagate... and what do you know, the average age starts falling rapidly after the Flood, from around a thousand years to around a hundred. (Incidentally, this means that living to a thousand years is a viable possibility for humans, we just have to discover what got lost.) Therefore, the most likely conclusion is that the prohibition was not needed before - there were few enough defects that the chance of two parents having the same recessive one (thus increasing the chance of it being dominant in a child) was too small to matter.
What about another example: basic hygiene. Read Leviticus 15 and get stunned by the detailed instructions. Would a plain "wash yourselves so you don't get sick" have worked? In fact, there's even a mention of the reason for this commandment: "You must keep the Israelites separate from things that make them unclean, so they will not die in their uncleanness". How could you persuade a bunch of stubborn tribesmen to obey it? Why, make it religious: "... for defiling my dwelling place, which is among them".
What about having a day of the week off? Well... in 1922 Ford reduced the workweek to 48 hours (see Wikipedia) so it was even longer before then. That's in the richest country in the world. Can you imagine any employer granting an employee a non-working day a thousand years ago, let alone five thousand, unless it was a religious commandment?
Ok... wrapping it up. It seems that whoever wrote (or at least directed the writing of) the Bible had a lot of knowledge for the time. Prophecies can be claimed to have been added after the fact; how do you add genetics and hygiene and worker rights in a thousand-years old book?