Why "wasser" and not "waßer"?
As far as I know, ß is only used after diphthongs and long vowels.
So, the eszett makes it clear that the vowel in Maße is long, and the double-S shows that the vowel in Masse is short - both are pronounced quite differently. The word Wasser can't take an eszett because the vowel is short, it isn't pronounced like Waahhssah, just Wassah.
P.S. The rules were different before 1996, where Haß became Hass and ißt became isst. However, Wasser has never been spelt Waßer.
Good explanation. Before 1996, "ß" was also used after short vowels at the end of a word (der Haß) or if a consonant followed (du haßt), but not if a vowel followed (wir hassen, Wasser). I think, the new rules are more straightforward, as they are based on the pronunciation.
Triolinguist has it right on. However, to make life easier for you: If in doubt, use "ss" rather than "ß".
Reason: The "Rechtschreibreform" (Reform of Orthography) has changed a lot of formerly "ß" to "ss", and it is and has been common practise to substitute "ß" with "ss" on keyboards that did not support the "ß".
A misplaced "ss" won't raise an eyebrow, a misplaced "ß" screams "legasthenic"!