The bike swapping rules change a bit from year to year. As others have noted, even when bike swapping for advantage is technically prohibited, cyclists may fake a mechanical failure to have an excuse to get the bike they actually wanted for a segment of a stage, especially those longer mountain stages that include long downhills in addition to climbing.
The TDF is as much spectacle as sport. As with American football the rules are designed to be TV-friendly and appeal to mass audiences who aren't necessarily hardcore cyclists and cycling aficionados.
Like special teams players and playing the clock in the NFL, it's all part of a certain kind of spectacle/sport that isn't necessarily intended to appeal to purists. It's not better or worse, just different. Like doping, equipment swaps might as well be allowed for the grand tour because it's going to happen anyway. The TDF has a grand history of outrageously hilarious cheating dating back to the very first race. Might as well enjoy the absurdity for what it is. The best are still great athletes. It's mostly amusing watching the ethical dancing everyone does trying to pretend it's something that it very clearly is not.
Take a peek at this bike swap. You'll need to slow it down to see what happens.
Money changes everything. Take the big money out of racing and even Lance Armstrong has to do his own roadside repairs to finish a race. No crew with spare wheels, let alone spare bikes.
"A saddle! A saddle! My kingdom for a saddle!"
Kurt Asle Arvesen rides 20 km without a saddle in the Paris-Roubaix. Hardcore, dude.