Why do some folders have an underscore at the front?

It doesn’t ‘do’ anything in particular. Personally, I sometimes use an initial underscore for subdirectories that aren’t meant to be used publicly. I can also use this method for subdirectories in my local (development) environment that shouldn’t be FTP’d to the production server. The initial underscore helps by (a) keeping those directories sorted separatele and (b) providing a visual clue that they are ‘special’.