It could be because the author took time to give a detailed explanation of how he implemented it. It shows to a beginner programmer that (s)he could automate simple tasks like this easily and a way to approach it.
Absolutely - I spend a fair bit of time on here, but I'm only a beginning programmer, using Python. This is exactly the sort of thing that inspires me, and also it's well written in terms of understanding for someone of my level. Obviously it's trivial to 99% of HN readers at a technical level, but I think there's room for this sort of thing.
I teach for a living (music technology), and it's incredible how badly a lot of things are explained (in all fields). Clear explanation and worked examples, combined with appropriate progression in difficulty is what makes for good learning, and I think this is a good example.