Ethan Hein does an excellent job breaking down what makes "So What" work phrase by phrase and lays out its AABA form. For those with more of a classical music theory background what should jump out about that form is that it can be thought of as a kind of rounded binary form. I don't want to digress into how familiar Davis was with both jazz and classical music because I want to jump straight into why this assymetric form is so crucial to making "So What" a magnificent composition.
The AABA form has two different aspects that make this simple composition pregnant with possibilities. The first is that the composition can feel like a kind of cut-short 12-bar blues by way of hypermeter; every two bars of 4/4 can be thought of as halves in the call and response phrases. There are multiple levels of 4-to-the-bar going on. Davis doesn't do the conventional V-I finishing pattern that would come if this were a conventional blues and lets the AABA continue whereas a more blues-traditional form would have had an AABAB'A pattern that gave us the three-phrase-at-the-macro-level pattern that's common in archetypal 12-bar. He was playing with a norm in phrasing and phrase-length that, if you don't have that in mind about how a blues "should" sound, won't make sense to you. Or as Hepokoski and Darcy put it in Elements of Sonata Theory there can be norms of form or gesture or listening that are in the background that can guide our understanding of the conventions or "deformations" of a musical work that are nowhere in the foreground of the musical work we're analyzing. Now I'll get to the second thing that stands out for me about this work.
"So What", within its AABA has an asymmetric phrase structure that is amplified by a harmonic substitution that counteracts what would be a pedestrian symmetry within the mode if no substitution were made. I'm talking about the formal assymetry of the D dorian to E flat dorian. That E flat dorian section is paradoxical because, of course, the dorian mode is symmetrical and if you invert it the mode is has the same intervals going down as going up, unlike, say, an inversion of the intervals of the phrygian mode that will give you the lydian mode. The risk of using dorian is that because it's a symmetrical scale if you did do a traditional i-iv blues change there would be no momentum at all, which is why Davis' decision to do a neapolitan substitution that pivots dorian from D to E flat is such a brilliant compositional move. There's still a "IV" function and it's still in exactly the place it ought to be if we were hearing a 12-bar blues but it is an abrupt Neapolitan substitution that keeps the dorian scale above the new-found harmony.
Now dorian in jazz and rock has long since become commonplace. If I were to pick a favorite long-form dorian-based piece it would be Frank Zappa's "Nine Types of Industrial Pollution" at the start of Uncle Meat and "King Kong" at its end. Those are cool as they go but when you hear them you hear that there's a i-IV floating-in-space vibe. Through the 1960s and 1970s the dorian i-IV progression became a thorough-going psychedelic/art rock cliche, perhaps nowhere more prominently used than at the starting song of Pinkfloyd's Dark Side of the Moon, "Breathe" I wrote about the use of the dorian mode and the i-IV progression within it as a way to understand the concept album all the way back in 2007. Now I'm not meaning to suggest the mode was really what they were consciously thinking through, I think music theory in general is too post hoc to be used to say something like that. Plus I kinda figured everyone in the band was high as a kite and that there was more of a literary and "hey, this vamp sounds cool" vibe going.
Well, before psychedelic rock and prog rock beat the i-IV groovy dorian i-IV thing into the ground Miles Davis didn't want to have a work that has become a touchstone in modal jazz be "that" modal. He introduced an elegantly simple and brilliant substitute for what would have been the i-IV in a stereotypical dorian progression with a flat II (i.e. Neapolitan) substitution.