[marathons are] treated as if there are two separate races, the men's and women's. It's perfectly possible to do the same with the Tour de France, but they choose not to
Having a women's TDF and a men's TDF in the same race, would be extremely complicated because as deydodo pointed out they have the whole entourage cars and helicopters to organise too. This would all be double the size if we had a women's tfd.
If they had women and men setting off at times that lead to women actually competing alongside men this would be so detrimental to women, very dangerous.
There are already so many crashes and accidents and even deaths in the tdf.
Cavendish was criticized for strategically "barging" during his sprints. You wouldn't want to be a woman getting in the way of that, or have a much bigger heavier man fall on top of you in a crash, or push you into something.
Some competitors have continued the tour covered in blood, with broken bones, they even have a special winning category for riders who continue despite serious injuries.
The TDF have made the right decision.