The parts that come OEM with a bike, and just like certain car parts, are built with cost in mind. They cross off all the safety boxes, rigidity, won't fail for a very long time etc. But they are not the best parts. Even the engine oil in your car could be better and give you better fuel economy. A better understanding of manufacturing and business priorities would give you an understanding as to why aftermarket exists.
There is one exception to this rule: top-of-the-line models. You will get pretty much close to everything top notch. There maybe even better parts in these builds, but the differences would be extremely marginal.