Thanks for this explanation.
It made me realize the reason for us having strange files in our group SharePoint! And I'm surprised really, that you let file attachments leak into the group SharePoint document library like that!
I would consider the current way attachments are handled to be a bug. A bit more politely stated; There's room for improvement! And I actually just found an item in the Planner Uservoice regarding this. Dating back to 2017.
https://planner.uservoice.com/forums/330525-microsoft-planner-feedback-forum/suggestions/19524835-folder-for-attachments
Please have a look at it and I hope you agree that this situation can be improved. (Added a comment in there with a suggested way of improving this)
Regards