Unfortunately this is the way FCP was built from the ground up. And yeah, you can get into a big mess easily. you have to be vigilant. I’ve spent many hours at the end of a job trying to collect all the bits and pieces… and pulling out my hair in the process
However, if at the end of a job, you want a tidy little package of your final timeline… you can use Media Manager to make a copy of everything you used into a new folder.
p.s. don’t say “file” when you mean “folder.” you’ll confuse us!