It's one of the many developers' ways of making sure that anyone will be able to beat the game, even those with little to no knowledge on team building fundamentals.
When building a Pokémon team, there's that sort of dilemma: Is it about winning with your favorites, or popular, or good looking ones because... you just like them? Or is it about thinking your team considering their roles, move sets, strategies, weaknesses/resistances, and how they can complement and cover each other, even if that means including a few Pokémon you might not fancy much?
Of course, if you can do both at the same time, then the better, but sometimes you may not. With free switches they make sure that even if your team's defensive coverage sucks it's no big deal, so... let's say your beloved Charizard is about to face an Aerodactyl and you don't have anything on your team to switch on that incoming Stone Edge? No worries, free-switch and problem solved.