It takes a deliberate act of analysis to arrive at five nasals. What a listener hears is one nasal sound that changes slightly according to what follows it, and most writing systems in the world record it with one letter, leaving the variation to the reader. The Indian phoneticians instead asked where each variety is made, found five points of articulation matching the five classes of stops exactly, and gave each its own sign. That is a finding about the sound system rather than a convenience of the writing, and it anticipates by a very long way the terms modern phonetics uses for the same facts.
Brahmi records the finding directly, and every script descended from it keeps the five letters in the five places that close the five classes. The arrangement is one of the strongest pieces of evidence that the inventory follows the Indian analysis of speech rather than the order of any alphabet received from outside the subcontinent. The letter shapes may well be borrowed, and epigraphists have argued about their source since the script was first read again; the structure of the table is not borrowed from anywhere, because nothing outside India had it.
The five nasals also give a script something to do with the anusvara. Because the value of that dot is determined by the following consonant, and because the following consonant belongs to one of the five classes, the mark and the five letters are two ways of writing the same information. A script with one nasal letter could not use such a mark, since there would be nothing for the reader to work out. The analysis and the notation are fitted to one another, which is what one expects when the people who worked out the sounds are close to the people who arranged the writing.