Things aren't always as simple as they seem, though in the case of relays its highly application dependant. While the diode provides a safe discharge path that preserves your switching transistor and power supply, it can cause a few issues in certain applications. Relays on closure can form a small weld at the contacts, and by placing the diode there you are essentially preventing the relay from opening with its full force. This can cause the contacts to 'stick' together slightly longer, and overall is bad for the relay. A trick I learned a few years ago to prevent that from happening was to put a zener diode in series (obviously in different direction) with the the regular diode, this allows you to control the maximum voltage and allows the relay's coil to discharge in a slightly better way. I recall some relay manufacturers had pretty good application notes on this, last one I saw was from Tyco but I couldn't find it again sadly.