The Locrian mode does not need any reason to exist, it simply does. It would seem stranger that we would give names to all of the other note collections built from the degrees of the Major scale, yet leave the seventh degree out.
The confusion here seems to be one about functional harmony. The idea of a tonic is part of functional harmony, but the idea of a Locrian mode is not part of functional harmony. That a Locrian mode exists does not in any way suggest that the Locrian mode should be able to support a tonic function.
This also does not in any way preclude the idea that music may be written exclusively in the Locrian mode; it would probably not be profitable to describe such music in terms of functional harmony. John Kirkpatrick's Dust to Dust is an example of such a tune, written in the Locrian mode. The first version is sung unaccompanied, and here is a version with accordion.
If there are no diminished keys, then why does Locrian mode exist?
There are no keys that relate directly to any modes other than the Ionian and Aeolian modes. The Major/Minor system (to which keys relate) isn't intended to be a comprehensive encapsulation of all possibilities of musical tonality.
A diminished chord can't work as a tonic due to its dissonance.
Yes, using triadic harmony while maintaining a sense of tonic would be a challenge in Locrian.
Why does Locrian mode exist?
The most common reason people talk about it is that it is one of the 7 modes of the diatonic scale. But though the diatonic scale is cleverly arranged to allow a number of modes that allow a lot of consonance with the tonic, it just works out that this particular mode doesn't.
The question mixes up key with scale.
In a very basic sense a key is defined by a tonic and a chord either major or minor triad built on the tonic, and a dominant tone a perfect fifth above the tonic and a major triad built on the dominant. This is what makes a key.
Simply selecting a set of chords by permuting the a diatonic scale doesn't produce a key. Example, selecting chords
ii V vi doesn't give us a Dorian key. Selecting
viio iii IV doesn't give us a Locrian key. That give use a modaly flavored set of chords, but not a key.
The important functional point is for the tonic chord to be consonant so that a cadence can conclude the music. A diminished chord isn't consonant, so it can't be a tonic, so we don't have diminished keys.
It's worth pointing out that the Locrian modes was not one of the ancient church modes. Surely this was because of the dissonance between
^5 scale degrees.
On a somewhat similar vein, if a passage was in the key of
C major and a
V chord accompanied a run up the scale from
B5 there is no need to call that the Locrian mode. It just playing the
C major scale.
It seems that when dealing with the major/minor system it's best to reserve the term mode for actual modal music.
The names of the gregorian modes stem from the names of regions in the ancient Greek world. Greek scholars such as Aristoxenos, Nikomachos and Ptolemaios wrote music theory treatises in which they categorized and named tonoi (modes) after such regions. They named their tonoi after the Dorian, Lydian and Phrygian regions, prefixing some of them with hypo (under, below) or mixo (half, mixed) to get a complete set of names. The Dorian region was on the Peloponnesos peninsula in the south of present day Greece, the Phrygian and Lydian regions were in present day Western Turkey.
The naming schemes from Greek treatises got interpreted and misinterpreted by European scholars from medieval times onwards, and they added names of various ancient Greek regions to categorize gregorian modes. A quick inspection of Van Aristoxenos tot Stockhausen by L.P. Grijp & P. Scheepers shows me that the Locrian mode was added by some scholars for schematic completeness, while rejected by many others. In the end the name Locrian got settled on for a scale running from b to b in the western tonal system.
The Locrian mode is mostly a music theory concept in western music history, and it is very rarely used for music pieces that use western harmony, but as a mode for monophonic music it is fine.
Locrian should not be regarded as a diminished scale, because it is simply a different scale. Locrian is a mode that can be derived from it's related Major key, whereas diminished is a scale in itself (correct me if I'm wrong). For example, C# Locrian relates to D Major and the four in locrian is not flat while it is flat in the diminished scale.