It is essential to write clear, legible, high-quality code. Developers don't usually intend to make code understandable by others. Instead, they are focused on solving the problem and finding a solution that works. It can be not easy to understand code written by others or code written a few weeks back.
SOLID principles help you to write code that is intuitive, testable, and more tolerant of changes.
TDD and Unit Testing can improve the security and quality of your code.