This generally happens when the yarn is produced from shorter fibers, which is usually cheaper wool. Longer fibers allow for stronger yarns at tighter spin.
Generally factory produced yarns dont have this problem as they circumvent the issue using long thread acrylics or other synthetic fibers and compensate for the shorter natural fibers.
Having said that badly spun manufactured yarns do exist and when mixed with a higher percentage of poor quality natural yarn it will result in a weak product.
Natural oils also help to make a better yarn, however these are largely absent in factory produced yarns as many buyers find them undesirable. Others prefer the natural smell, its a matter of taste.
Sometimes handmade and handspun yarns can suffer the same problems with shorter fibers or if spun incorrectly.