Simply because we're interested to see if we can do in Python whatever we can do in other programming languages / software. We don't really want to learn a new programming language for every thing we can't do in Python yet.
Also, it took 17 lines of code to generate the graph in the tutorial, among which 6 lines were to add labels (excluding from the total the lines of code for reading in the data or importing modules). The teaching approach makes it look that long.
You could also write some functions if you coded this kind of graphs regularly, and make the whole process a breeze.