If I add a file to an empty ~/Library/Containers/<app>/Data/Documents then the <app> suddenly appears in Finder as ~/Documents/<app>
Unfortunately it does not work the other way, deleting the contents from one of the "duplicated" folders does not remove the Folder from ~/Documents.
And in addition the finder displays different names for some of the files in
All of the following directories;
~/Library/Containers/com.apple.mail
~/Library/Containers/com.apple.mail.MailQuickLookExtension
~/Library/Containers/com.apple.MailShareExtension
~/Library/Containers/com.apple.share.Mail.compose
~/Library/Containers/com.apple.share.Mail.compose-back-to-sender
~//Library/Containers/com.apple.STMExtension.Mail
are shown simply as "Mail" in the finder, you have to guess which is which. How can someone think, that this is a good idea? Same for reminders and some other directories, maybe this is an localization issue?
Submitted feedback to Apple: FB8917307
I submitted feedback via the product feedback page:
https://www.apple.com/feedback/ But where do you get the id and how can I access it?
I guess, this adds to the long list of applications Apple changed so that they are just not usable anymore... And I guess it is documented nowhere.
There certainly is some relationships between stuff under Containers and stuff under Documents. On my machine I find plenty of symbolic links under Containers that point to locations under Documents. The links also existed in Catalina. But, what I found interesting about the second post you made Alwis was that you see the folder ~/Documents/BBEdit only in Finder; it's not visible in Terminal or Pathfinder. This is a different issue entirely. I don't have anything like that on my machine (I do own Pathfinder).
I to have symbolic links within the folders in ~/Library/Containers/, but the do only link to other folders beneath the same root, not to my ~/Documents folder.