Even if the GC riders weren't there, there would still be crashes.
Likely. But after it's down to specialists. Specialists that tend to know what they are doing and do train for it. Rules like penalty for endangerment, due to deviating from the line, that should help too. And lets not forget this last couple of km's are usually in some town or village. As the district invested money in the race and for sure they want the spectacle in the narrowest part. It's a sprint but hey lets bring the whole bunch!
And how do you decide who the GC riders are anyway? Would Wout Van Aert be allowed to be near the front? He sometimes does both...
Sure, why not. It's not like it would be illegal. If you have interest. Like lets say to win a stage. Go for it. As GC battle would already be decided by then, hence he could take the advantage from potential crosswinds situation too.
But can you give me just one example of a serious crash caused by GC riders being near the front during sprint stages? And by "serious" I don't mean "someone lost a bit of time", I mean serious injury, or even death.
Just read what Tony said. Somewhere in the lines of if you are doing 50km/h or up on a bike and you crash ... It's serious business. If you don't believe it put on some protective equipment on and try to crash with a bike doing 5km/h. You will get the point after.
P.S. Just don't do it for real as you will get injured.