The Gripen has some unique advantages. It's ease of operating, servicing, and STOL capability allows it to be deployed from just about anywhere - you can land it on a forest road, service it, and it can take off from a very short runway again. And it still has great performance.
It's really the perfect fighter for Switzerland - a country which doesn't really need a 2-engine fighter. The Rafale's main advantages are range and payload, which does nothing for a small country whose only need is self-defence...