There are many different reasons to test.
Unit testing allows us to plug into and execute our code without the application running.
It is an incredible tool to be able to handle. It can really speed things up.
See bundled github project for exercises and examples:
https://github.com/ddikman/five-ways-to-test