What Pat said is true, and I would add, it starts with tree selection... type, growing conditions, and quality. Then from where in the tree the stave is taken. Then proper and prompt field care, storage, drying. Add in a design well-suited to the wood's abilities, and to our needs of the bow, the experience and knowledge needed to properly tiller and truly balance the limbs, and you're off to a decent start. Limb imbalance alone causes set in selfbows.
Sometimes we can't, or choose not to, control all such things, and that's just the reality of it, but it does raise the risk of set happening, in what we tend to consider, 'beyond our control'. In other words, you can get a hickory stave from someone that left it outside under a tarp(happened to me), and it may look like a pristine piece of bow wood, only to take so much set as to be completely worthless, and far beyond any tillering, design, heat treating, etc efforts.