This system is the result of the specific historical evolution of Western music notation. The five-line staff was not the first try at writing down the pitches being used in European music. The first systems were just mnemonic, consisting of neumes (squiggles, basically) drawn above the words of a religious text, much like the cantillation symbols that anyone who has ever had a bar-mitzvah remembers being above the Hebrew words in the Torah. They simply stood for melodic formulas, without being linked to any determinate pitch.
These "unheighted" neumes were gradually replaced by "heighted" neumes: a single line was drawn to let scribes record higher or lower pitches, then lines were added to do this more systematically, and so on. The repertory of Gregorian chant in the Catholic Liber Usualis uses a four-line system (example: http://romaaeterna.jp/liber2/lu353.gif). This makes good sense, since there are seven positions on a four-line staff: the four lines, and the three spaces between the lines, and that corresponds to the seven diatonic pitches in any mode.
(Obviously it is possible to use the two outside spaces, which many chants do, to get the note below the final and the note above the upper octave. Much later, some scribes figured out that you could gesture at another line above or below the staff by drawing a line through the neume; these "ledger lines" are now common practice, since many melodies in classical music span much more than an octave.)
If you look at the example I linked to, you can see a little horseshoe-shaped figure wrapped around the top line; this is a "clef" -- that is, a key -- which unlocks the actual pitch information encoded in the system of lines. In the example I give, the clef marks middle C. (You can tell it's C, because there is a flattening sign (the "b") on the space below, and the only place you can put that flattening sign is under the C, for reasons not germane to this little discussion.)
That horseshoe, which actually looks like the letter "C," is thus a "C-clef," because it tells you where "C" is. It is the ancestor of what we today most commonly use as the "alto" and "tenor" clefs. (We put our Cs on the second or third lines of a five-line staff, but they are direct descendants of the one in chant notation.) You can imagine, given the range of men's voices, how convenient that clef is. Most men will be able to sing easily a melody that ranges in the octave below middle C. As vocal music grew more complex and developed multiple parts, some were more easily written around the note F a fifth lower (the "F-clef," or "bass" clef), or a fifth higher (the "G-clef," or "treble" clef).
Only much, much later did it become theoretically possible to put a sharp or flat sign at any place on the staff system, and thus notate twelve chromatic pitches on a five-line staff. At the point where any note could be flatted or sharped, it would have been logical to create a system where each of those notes was given its own line or space, but by then people had been using five-line staves where one line is locked to a given C, F, or G for hundreds of years.
And we still are.