I find I often rely on a bunch of third party packages. They are essentially part of my code but I don't care about their folder structure, only their API. These are stored flat in npm/cargo/pip. Lot's of my code ends up not being business-specific and could be extracted into similar small packages.
When I need one of these packages, I search Google, and typically read their API on Github. I never navigate a hierarchy to find them.
When we make our own code flat, we have problems because we don't have an easy way to search. Another argument would be that hierarchies can help contain dependencies - i.e. don't depend on code outside of a directory.
> that doesn't mean the hierarchy of the books on the shelves is useless
I just think the hierarchy should be virtual/automatic, and the focus should be on tracking dependencies between components. I think very few people would look at dependency graphs of their codebase...there's just not good tools.