While writing in an old-timey fashion, I figured out that it probably comes from the long S. We used to have a long s much like an uncrossed f. A double s would be a long s followed by our more familiar terminal s. (wasn’t it?) This, I saw, looks much like our beloves ess-tset/doppel S/whatever. Is this really the origin?
Or the Germans could have decided they needed a letter for two S’s, and gone back and used the greek beta.
Your first guess makes perfect sense. If you scroll down to the older forms of Spanish at the following link, you’ll see that the ess-tset seems to be in use (in the word “aßi”). It apparently wasn’t just in use by the Germans.
Since I couldn’t read a1997xf11’s link, I don’t know if it covered this but…
Medieval writing used a very large number of special double letter characters, Gutenberg used no less than 288 characters in his printing set. These were used as shorthand when books were copied manually. Many of those disapeared with the advent of moveable type, but there are still remnants, Eszett being one. Others include: Œ, Æ, and accented letters in French, for instance. (E.g. in “school” in old French -> Escole, in modern French -> École. The “É” replaces “ES”.)
Likewise, the “tilde” was used in Germanic languages to denote double sonorants. Thus, older German works (15th century, for example) can be found with the “ñ” in words where “nn” would be used today.
It’s interesting to note that the “ess-tset” (ß) was formed as the ligature of a long s and a short s and it is used to represent “ss”; however, the name “ess-tset” literally means “sz.” There is an “sz” ligature in traditional German script, but it’s not the ß.
This may be so, but the “ss” ligature is used medially as well as finally. And it is the “ss” ligature that survives; we’re not really talking about the “sz” ligature. So why is the “ss” ligature called “SZ”?
If anyone wants to see some examples, here’s a PDF from a font company that recreates various historical printing types (including all of Gutenberg’s symbols). Bear in mind these are all modern fonts, though they appear pretty faithful.
This page (in German) has a lot of information (scroll down to ‘Herkunft’) about the origins of the Eszett, including a lengthy quote from Grimms’.
While I can’t really summarize it all here, I think there’s a partial answer to acsenray’s question. Some Germanic words changed from ‘z’ to ‘zz’ to ‘sz’ or ‘ss’. ‘Wasser’ is given as an example (OHG ‘wazzar’). It looks like ‘s’, ‘z’, and ‘3’ (‘3’ denotes the ‘half-z’ that appears in the Eszett; it was also used for ‘z’ historically). They may have been mixed up together by whatever printers decided, especially before orthography was standardized.
To guess at why it survived so long, it may have to do with its use to occasionally denote a different word or a long vowel. From the link I gave above it seems the Rechtschreibreform makes the ß to be now only used after long vowels, partly removing some of the confusion.
There are exceptions, still, for dialect differences (Austrian had more ß’s and Swiss had almost none), and for personal names.
That is to say ‘Litfaßsäule’ (a pillar for ads or announcements) stays the same, but Russia and Alsace change – they’re proper names but not really named after anyone.
In your last example, panamajack, the ess-zett is handy too because otherwise the word would have three S’s following each other. Perhaps that’s one of the reasons the ess-zett has survived so long; double-S is a common ending for words in German (perhaps moreso than any other doubling), and when a compound word is made with one of those words and a word beginning with S, the number of S’s becomes unweidly.
Also, in that example they do sound different - the ess-zett is unvoiced, the S is voiced. The typography makes the pronunciation more obvious.
panamajack has it right. The sz is different from a double s, as it denotes that the preceding vowel is long. Since the spelling reform, the ß has been substituted by ss at the end of a word, but there still is a difference between “Masse” /masse/ (mass) and “Maße” /maase/ (measures, dimensions).
You probably do know the difference, but just weren’t taught it directly. They are very similar sounds. The long a (/a:/) is like ‘ah’ (in American English), with the short a (/a/) being the same sound but shorter. British English short a is closer to it than American short a.
Examples in German you may know are hat (short) vs. haben(long) or statt vs. Staat.
I also realized that my explanation of why it endured doesn’t necessarily require the ligature to have been used; SciFiSam’s suggestion that it prevents triple letters in compounds has more merit.