I depends on what you are making. If you are making a part that is non critical and takes little load, then anything you pick out of the junk pile will probably work. On the other end of the spectrum, for parts that go on millitary aircraft, you have to have records on the metal you are going to use that go back to the diging up of the ore, composition testing, hardness testing x-ray and mag particle or die penetrant crack inspection on every part (and sometimes the raw material before machining the part). For most of the stuff we make as hobbyist just buy known alloys from a metals dealer. This won't absolutely garuntee you quality material, but it is economical and will get you good material 99% of the time.
When materials are purchased from suppliers, the buyer can request material certifications. Material certifications have two main components. First is material composition and chemical analysis. There are primary and secondary material composition statements. The foundry of the steel may supply a primary cert or, the distributor may perform a secondary test to verify that what they received is what they ordered. Second is chain of custody that shows the shipping manifests to show that the materials were not mixed-up (or boot-legged) during shipping.
The practice of obtaining material certifications is only done in certain cases where high quality control procedures are in place.