Could the answer be simply that by putting a woman away during menstruation kept primitive men from having to deal with any PMS issues?
Something gave them the idea that blood can be impure. I find it interesting that the menstrual verses are next to the leprosy cursed verses. Chapter 12 of Leviticus calls for a purification after birth and then chapter 13 talks about skin diseases and ways of purification. Nice of them to say god told them but I see it as their way of smartly handling something that was likely problematic for any group. Some superstition but intelligent for the most part.