Finder by default lists directory contents alphabetically regardless of whether it is a file or a folder. It could be not very clear for some, especially if you're coming from Windows or Linux environment where folders are listed first before files.

Finder can, however, be configured to list folder first from its preferences options.

Steps to sort folder first for Finder in macOS:

  1. Open Finder preferences from the menu.
  2. Click on the the Advanced tab.
  3. Check the Keep folders on top when sorting by name box.
  4. Finder will now lists folders before files.