Weeks are largely biblical(with pagan day names, that's fun), but they got it from wanting a quarter month sized unit of time. Not deliberately with design, but I suspect that is how it fell out to satisfy their religious requirements.
The tricky part about months (and weeks by inheritance) is that while the moon phases are a nice easy mid-range timekeeping device(something between days and years) they don't line up with days or years very well. So as your society settles on having 4 important religious observations per month and starts keeping better time. It changes to having that observation every 7 days and delinking the month from the moon so it does not drift around the year so much.
I don't really know how the BCE biblical world did the week keeping. but our modern interpretation was mostly solidified by incorporating approximations of that into the other big influence on Europeans society, the Romans. Who used a month and half month system so it fit fairly well.
The tricky part about months (and weeks by inheritance) is that while the moon phases are a nice easy mid-range timekeeping device(something between days and years) they don't line up with days or years very well. So as your society settles on having 4 important religious observations per month and starts keeping better time. It changes to having that observation every 7 days and delinking the month from the moon so it does not drift around the year so much.
I don't really know how the BCE biblical world did the week keeping. but our modern interpretation was mostly solidified by incorporating approximations of that into the other big influence on Europeans society, the Romans. Who used a month and half month system so it fit fairly well.