A lunar month is 28 days.
There are few divisors of 28. 2, 4, 7, and 14 are the only ones. 28 days is too long for convenience if it's your shortest grouping of days. 2 days is too short. So, 4x7 or 7x4. Having 7 4 day weeks every month is probably a bit less convenient than 4 7 day weeks. Hence, 7 day weeks. (Or two 14 day weeks, which I think you essentially used to see some of the time: it seems like 17th-19th Century Britain was more aligned on fortnights than weeks).
Not NECESSARY in the same way that days are, but it's not exactly mysterious how they came about.
Edit: Oh, also, in terms of preferring 7 or 14 to 2 or 4, think about the lunar cycle. It easily breaks down into 7 or 14 day periods (7 days = new to half, or half to full, or full to half, or half to new. 14 days = new to full or full to new. 4 days = ?)
Edit2: Of course, a lunation (full moon to full moon) is 29.5 days, as opposed to the sidereal month (same part of sky to same part of sky) of 27.3 days. But I suspect that in antiquity, most people dealt with a conventional 28 days for both.