Like said, I normally buy a domain and setup an idea and work on it. In the process I learn a lot.
The risk of creating a bunch of toy programs on your local disk that you never show to anyone is that you avoid the hard parts. Accountability is a good thing, in programming and in homework.
Also one would learn to tweak a server to the application.