There have been near misses indeed in the last years, but it actually came into place because of a not-miss (Langeveld who crashed into a supporter during the Ronde van Vlaanderen 2012).
Still... the rule is too much open for interpretation, since apparently even the UCI-head commissioner (Peter Judez) said himself, if 1 rider does it we disqualify him, if 30 riders do it, we don't do anything. And if the rule is to protect fans and riders, does it make sense to apply the rule to a piece of road where there aren't any supporters standing on the "alternative road"?
It's an interesting view. One opinion might be "forget the spectator issue, but if one or more riders do it TO GAIN AN ADVANTAGE then it's open to sanction". Which is OK but then who defines what an advantage is? It may be an advantage later in the race not to have been shaken about a bit on the bumpy stuff, but how do you tell?
The simple case is that's it's always gone on, and in a more litigious age, UCI have created a rule to say it shouldn't, so if something goes wrong and the lawyers get involved, they can say "we made a regulation about it because we recognise a danger, so it's now up to the race commissaires to enforce it, and they can only do that if they see it happen". The Lincoln GP had a nasty little cobbled climb to the finish, and a few years ago riders would hop on to pavement alongside, the last time I saw the race there were barriers at the road edge to stop it happening, but that's only a short stretch, not kilometres long sections.
Right, it's warming up so I'm off to the local cobbled road to remind myself what fun it is.....