A reason could be, that the tracks in the folder have separate tags for those fields which are sorted per album. These fields are for instance:
album (=album title), album comment
In a folder containing a compilation album, so a set of tracks with the same album title but separate artists, the album is only shown as a single album if all album titles are identical. If only one (or more) album titles are different, all tracks in that folder will be sorted per artist, NOT per album name.
It drove me crazy, but after I found out the solution was easy.