Anime is very derivative. But with each new iteration things change a little. Some masterpiece comes along to redefine the genre and then everyone else derives from the latest masterpiece.
The shounen genre is like that. So to answer your question, we have to trace the genealogy back to the roots.
Let's start with some shounen anime that's relatively new: Boku no Hero Academia (2016). It's about someone without a superpower in a world where some people have superpowers and his journey to become the best hero or whatever.
It's clearly a derivation of that one anime about a somewhat talentless boy attending a school with other kids who all have superpowers, while dreaming of becoming respected by everyone from 2002 called Naruto. This older anime also has the aspect of the hero wanting to follow in his fathers footsteps of becoming the village head. Not to mention everyone is a ninja and the guy is somewhat of a simpleton.
Which in turn is a derivation of that anime about this kid from some remote village setting out to follow in his fathers footsteps by attending an exam in the middle of nowhere to officially get the same job his father has. Afterwards he also gets powers related to martial arts. I'm of course talking about Hunter x Hunter (1999).
Or I guess the Naruto manga (1997 as a pilot) predates the Hunter x Hunter one (1998). So let's take another step back.
Remember that anime about the boy with a special constitution that is kind of an idiot, but really strong and sets out on an adventure but first makes a stop to learn martial arts and then only gets stronger and stronger? I mean Dragon Ball (1986).
Other than ripping off the ancient Chinese story Journey to the West from the 16th century it also was inspired by some anime. And since Journey to the West didn't feature the desire of self-improvement within the protagonist, only the idiot-protagonist part, we are getting closer.
Our next stop is that one anime about this delinquent guy who scams people, but got caught by the police and is thrown into a juvenile prison, where he learns how to beat everyone up using techniques from a sport that he should become very proficient in. Getting better in this sport isn't necessarily the driving force behind the story, it's more about life in general, but it's an important part nevertheless. The sport I'm talking about is boxing and the anime is called Ashita no Joe (1970).
Now we're still not at our destination, since Ashita no Joe was just a derivation in itself and like with Hunter x Hunter and Naruto, Ashita no Joe wasn't the only contender. Otoko Ippiki Gaki Daishou (1969) was very similar, just without the sports aspect of the story.
If you go further back it's mostly baseball manga and after that manga didn't even exist. Here's where my expertise on the topic begins to thin out.
But it's enough to answer your question. The strive to get better and better originated from sports manga and anime. Baseball turned into boxing with Ashita no Joe and later into martial arts with Dragon Ball. After deriving Dragon Ball the sports aspect was fully removed and substituted with general fighting, maybe throwing in a tournament again, like in Yuu Yuu Hakusho (1992). But the spirit of having the protagonist not give up and become stronger was kept over all these decades.