Samu is right though, the 24h du Mans is a much better comparison point, because the course is far more crowded with a much larger discrepancy between fastest and slowest cars and varying quality of driver (is the guy in the LMP2 Jumbo car the ex-GP2 and DTM pilot with a decade's top level experience? Or the mid-40s gentleman driver who owns the car? These are things that affect how you react when you come to pass that car at 190mph, or when they appear to pass you in your rear view mirror, depending on which class you're driving in).
The other thing with the F1 comparison is, they drive on permanent circuits specifically designed for them. Apart from Monaco there are no 'true' street circuits anymore, they're all smoothed off like a billiard table, some of them even ignore where the actual roads go and are essentially just normal race tracks but in an urban setting, so things like Sochi, Valencia and Yas Marina are street circuits in name only. Baku and Marina Bay are hybrids (like La Sarthe is), and Montreal and Albert Park are parkland circuits. However, the thing that separates this out from cycling is, cycling uses unaltered public roads. Even Monaco sees public roads affected. A lot of that street furniture that is so hazardous for a pro péloton to come bounding through... for 364 days a year, that's essential for the safety of regular road users. It's a lot easier to improve the safety at an F1 circuit because you have to have an FIA Grade 1 Licence to host an F1 GP. If your circuit doesn't meet the safety criteria, then fine, we'll just withdraw that licence and you can make do with lower series like GTs, touring cars and the like. If that means building a new area of run-off, then so be it. It's all land that the circuits themselves own and can work with. And if it's successful, then great, you can keep races coming back to recoup the cost of those works. Not so with cycling, where it's the town or region which pays, not the circuit owner, because nobody 'owns' the point-to-point course. You pay to have the race come in, and then they have to work out how to make a safe finish in the town or city that is planned as host. Their recompense is through television exposure, tourist revenue and local businesses gaining from the influx of fans and the hotels, cafes and restaurants filling - there's no ticketed income like there is at motorsport where they can jack the price up a bit to cover their costs. You can't tell the town to construct a new run-off area or demolish a building in order to widen out a corner from being unsafe for a one-off event that they're already paying for. The most you can get a town to do is remove some signage temporarily and flatten out traffic islands.
The other thing is that, in F1, increased parity in the field of competition is a good thing for safety. It means nobody is dangerously slower than anybody else. In cycling, it's almost the reverse. Having a péloton of people who are all of an elite level means almost nobody dropped in a flat stage and suddenly you need a road which can handle 150 riders all going high speed in unison as the sprint is set up. The 2012 Giro's Danish start is a good example - they used roads, some of which had been used without trouble in the Danmark Rundt, but it was almost carnage with the Giro's péloton. Why? Well, for a start there's over 50% more riders in the Giro. Then you take into account 8 (or back then 9) riders per team as opposed to 6 or 7. Then you factor in that there's a greater proportion of high level riders there so it's harder to thin the pack out so more people are fighting to be at the front. Then you factor in that it's the first few days of a GT so the péloton tends to be nervous anyway, before the GC status quo has been settled. Then add onto that that the péloton in the Danmark Rundt will largely consist of teams who know what racing in Denmark is all about, whereas in the Giro we had some teams like Euskaltel and the Italian wildcard teams riding to protect waifish climbers who are completely out of their depth in northern classics-style racing. And finally, because of the nature of the Danmark Rundt, bonus seconds and being up at the front in the flat stages means that often the people contesting the sprints and the GC men are one and the same, whereas in the Giro you have a full sprinting field AND a full GC field all needing to fight for places at the front.