With the current setup these folders are ignored in the whole repo, but they're only automatically generated in the project root so it makes sense to only ignore the ones in the root.
I made this change because one of the assets in my project uses a folder called 'Library', and I was wondering why it never uploaded that folder.