The Sanskrit consonant table is designed so that position implies sound. Five classes, each named for a point of articulation, and within each class an invariable sequence: voiceless, voiceless aspirate, voiced, voiced aspirate, nasal. Twenty-five letters are therefore specified by two coordinates, and a learner needs to remember the five points and the five treatments rather than twenty-five separate facts.
This is the property that made the table portable. It can be taught to somebody who does not speak the language, checked by ear, recited without a manuscript and reconstructed from a fragment, because the structure carries most of the information. A learner who forgets a letter can derive it. A learner of an alphabet cannot, because there is nothing to derive it from.
It also explains why letters that write almost nothing are kept. The predictability holds only if the grid is complete: a class with an empty slot would break the rule for every class, since a reciter would have to remember which one was short. The cost of keeping four or five rarely used letters is far lower than the cost of losing the pattern.
The same logic runs through the vowel section, where every quality has a short and a long member whether or not the language uses both, and it is the single most characteristic feature of the whole arrangement.