Instead of/in addition to scrapping the weapons, you can 'disassemble' the weapon, breaking it down into its various weapon components, destroying the weapon. That way you can use components on weapons you otherwise don't want without having to spend resources to replace that component. i.e. you find a non-legendary hunting rifle that uses a receiver you want for your legendary rifle but can't make yet, instead of having to craft an extra receiver you will never use to replace the one you removed from the gun you will never use, you can just disassemble the entire gun, and put that receiver into your rifle.