The gravel stage (like cobble stages) exists to create gaps in GC before the mountains. That and of course creating buzz and entertainment for tv ratings.
It's not specifically made for crashes per se but definitely drama and potential time losses for GC favorites. It would be extremely naïve to believe otherwise.
Yes it's there to create exitement and because there will be GC action, but it won't just be there because of crashes or mechanicals. Other stages effect GC as well and have crashes and mechanicals. Who said GC action can only happen in the mountains or TTs? A GT is there to find the best rider on multiple terrains, otherwise it could be a one week climbers race with one TT.
I am pretty sure though it's not there to crash the favorites out as @CyclistAbi was saying. It doesn't make sense to diliberatly try to crash favorites out. It's just a fact of road racing that riders crash out on all sorts of stages.