I think it's not strictly required, it's more of a good practice. By checking for __name__ == '__main__' and only executing code in that case, it allows the same script to also be imported as a library. Not sure how to write that comment succinctly... maybe like this?

```python
# Python executes any top level code even if the file is imported.
# If you want your code to only run from the command line, this is a common pattern:
if __name__ == '__main__':
  # This code is the entry point to the program
```