Teams SharePoint and OneDrive

Each team site is associated to a SharePoint team site, and each  team channel in the team gets a folder within the default document library in SharePoint. Each document that is shared within a team conversation is stored in the SharePoint document library, encapsulated within the security trimming associated with the SharePoint document library.

Private chats files are stored in the sender’s OneDrive for Business following its Sharing permission rules. the sharing is done through link to OneDrive rather than a copy to the file in SharePoint team site

 

Ref:

https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-and-Teams-Better-Together/ba-p/189593

https://docs.microsoft.com/en-us/microsoftteams/sharepoint-onedrive-interact