2 Answers
Stackdriver is the GCP service which collects all the logs and metrics of all the other GCP services. Its where you will go if you want to view the logs of your VM or the logs of another service. Stackdriver is also used for real-time logging. So you can have the Stackdriver webpage open and watch the new logs come in as it happens. If you wish to permanently store your logs, so you can view them a week or a month from now (for example) then its a good idea to upload the logs as an object into a bucket on Google Cloud Storage. The logs will still appear in Stackdriver.
So to answer your question, your logs are always stored in Stackdriver but you can also upload them to GCS to store the logs permanently.
There are two different types of logs in this lab. The first kind is the system logs that are pulled in by Cloud Logging via the Stackdriver agent. The second type of "log"–the one moved about by gsutil–is just our own little startup script "log" of the work that was performed by this instance. The purpose is to demonstrate multiple different ways that multiple different types of data can flow through the system. And in your own system, you are just as likely (or even more than likely?) to be transferring other files/objects (than custom logs) between the instance and GCS. You could be transferring anything you want, in both directions.
I hope this helps.
Mattias