Before I began writing my first novel, I spent a few years working on short stories so that I could improve my language and mechanics. I also did this because I wanted to get a few publishing credits to my name before I took a major work to an agent or publisher; I thought it was very important that I had some experience with publishing rather than just dive into the novel business with nothing on my resume, especially at a young age.
I had a bunch of stories eventually be published in both print and digital formats across a variety of small-print outlets, but I also had plenty that never found their way to the public. Some were outright rejected by the publishers I sent them to. A couple were accepted, but the publisher ceased operations before/after they were published (a very common occurrence in the independent writing scene). Some I wrote just for the heck of it, and never even tried to get published.