It does not matter if you are an experienced programmer, it's very normal that you will commit mistakes in your code at some point in time. Nobody is perfect and errors happen all the time in software development. Your work as a developer is to minimize the number of defects that are in your software.
Errors can occur from different sources; an unexpected input, an error that is not handled properly, a change in a third-party plugin, a memory issue, and so on. Your code should be prepared to deal with these kind of things.
In the software industry, the rule of thumb is to always test your code. When you test your applications, the final product has a better quality as many defects have been detected and corrected before the users notice it.
Tests are not just undertaken to prevent bugs in the software. The following is a list of benefits that you get when you do the testing:
Improves end-product quality
Makes you confident with your application