Why does the horizontal bar in the folder pane move for no reason?

Why for some folders when I click on a folder above the selected folder, the horizontal bar jumps to the right and I have to move it back manually to the left?

By default it scrolls to keep as much of the name in view as possible. You can disable this using Preferences / Folder Tree / Options / Manual scrolling only.