You don't have to write a production-quality sorter for a CS class, but you ought to learn and understand the algorithms, and having to implement them is a good way of doing that.
I've never written a compiler professionally, but what I learned by writing one for a compiler design class has had a long-term benefit. Besides taking the mystery out of programming itself, it made it easier to learn new languages, and to write some domain-specific ones of my own.
Thos. Edison was an archetype of the innovative entrepreneur, and he was not a "idea person". He was a relentless prototyper, experimenter and learner.
Learning by doing is essential. Ideas have to be generated, tried and qualified (and mostly rejected) by doing, not just thinking.
Whoever dies with the most toys wins.