One of the reasons documentation helps people trust your code is because they know if this function is something you intended to do for this code (and which, all other things being equal, will be saved in future versions code), or that the current code just happens, but that can change at any time as a side effect of a fix or just refactoring.
Some people prefer to find out what code really does by looking at it, and that’s fine, but the documentation tells you (a) what the code should do, and with some luck (b) that I’ll do the next version of the code. If I want to use my code for a long time and accept updates for corrections, as you have provided them, then I need to know that you have developed an interface that I can rely on, and which you are ready to stick to. Documentation is a strong hint that you are at least trying to do this.
source share