I recently joined a Google Group and upon joining, several shared files started appearing in my Google Drive.
Is there a way to prevent this from happening without leaving the group?
Deleting a shared document will not change your group status. If you no longer wish to receive shared documents then I would suggest talking to your group administrator who may be able to put you in a category of "group member" but exclude you from the "share documents" group. This is completely up to how your group is organized and run though.
When other groups share documents with you they will appear in your Shared with Me directory. The only way a shared file can be listed in My Drive is if you take the shared document and place it there. Remember, if you placed a Shared with Me folder in your My Drive all files and subfolders in that file will now be in your My Drive.
The All Items folder displays all documents in your My Drive and Shared with Me directories.
If you want to remove a shared document form your My Drive directory then simply delete it.
If you want to remove a shared document form your Shared with Me directory you can simply delete it.