Maimonides explains that Bereishit - Genesis - had to be written in obscure and non literal manner. This is so the simple people can understand it at their level, while the more intelligent people can understand it deeper. But to reveal all of scientific knowledge would have been impossible for people to comprehend.