I think they come from a Mosaic tradition, but it’s obvious there’s been some edits (like anachronisms in location names… where certain cities are named a current way for the reader, when that name didn’t exist in Moses’ time). You could chalk this up to the Jews also having a living tradition, in the same way the Church does.
Mosaic authorship wasn’t even ascribed until the apocryphal book of Jubilees, which is fairly late and after the Exile. After that, the Jews of Jesus’ age and the Church simply called the Torah the books of Moses because they’re either Mosaic in content or based on the laws he gave.