How would a story flow if I made the secondary characters solely for the purpose of showing the reader how the main character has grown though the years? I'm thinking a 10 year span right now. They would serve as "learning tools" if you will, shaping the character into the man he will be when the story has finished.
That is what secondary characters are for. If you conceive of a story as the arc of a principal character, then every event and every secondary character exists to define that arc, to push the character along that arc, and to demonstrate the change that occurs in the character (if any) as they traverse that arc.
Of course, some characters are more secondary than others. Some stories have multiple protagonists, each with their own arc, though usually one protagonist is preeminent. Some secondary characters have partial arcs, if only because for them to play their role in the main protagonist's arc, they have to develop as well.
The main concern in all of this is that as much or as little as you show of any particular character, whether you give them a whole arc, a partial arc, or merely a cameo, the reader has to find them convincing. If your secondary characters suddenly change behavior in the middle of the story in order to push the main character to the next plot point, the story is going to be unconvincing.
This, of course, makes piloting your main protagonist's arc to its desired end a complex bit of logistics, which explains why this stuff is hard to do and why most who attempt it don't manage to accomplish it with complete success.
There aren't any obvious paint-by-numbers tricks to accomplishing this. However, readers will typically give you much more leeway on improbable events than they will on inconsistent characters, as long as you foreshadow them appropriately.
Your story will flow fine if you create secondary characters who exist simply to show the protagonist's growth, just as long as their characterization is consistent, and they behave in a way that is consistent with their character as you have established it earlier in the book.
Adding a couple of points to @Mark Baker's answer (please read that one first).
It is fine if the secondary characters exist solely for the purpose of supporting the main character, but don't let the readers notice this. A nice guideline is "every character is the hero of their own story": your choices as you develop them in the story are guided by what the main character needs, but their existence in-universe is about them; if they seem unconvincing to you, you can think what you would change if they were main characters, and then try to reconcile your conclusions with what the actual main character needs of them.
There is no reason to do less when you can do more. There will be opportunities to enrich your secondary characters in ways that are not strictly necessary for them in their role of supporting the main character. As long as it does not detract from your story, why skip such opportunities? The main point is this: if you strictly adhere to some storytelling model where you've decided to limit the role of secondary characters, you might end up taking the idea too far. It's fine as a general idea, but don't impose it as an obligatory limitation on your story (unless you have some very specific reason to do so).