This is quite intuitive if you take it to the logical extreme. If someone wrote a program that jammed all of the characters together into one long continuous block of text, you would immediately get negative feelings about the work, even without reading a single character.
The same holds true even when some care went into the visual design of the code. A codebase that does not present a good visual design will feel difficult to work on, even if it is well written from a technical standpoint.