There are two aspects to why teachers assign short stories. The first has to do with why students are assigned fiction in general and the second has to do with the choice of short stories versus novels.
Literary works have been central to education for as long as education itself as existed in every known culture, including those of India, China, Mesopotamia, and Europe. The main reason literary works have been so ubiquitous is that they teach students the skill of reading and serve as models for student writing. Although more practical written works could also function in this way, given the short attention spans of most children, literary works are also considered more engaging than, say, legal documents or tax records, which constituted the vast majority of written texts in most periods.
The choice of short fiction versus novels again has to do with practical assumptions about student work habits. It is possible to have students read a short story in class or even to read it aloud to them, something not possible with a longer work, increasing the chances that students will actually go through the entire story.