There is a place in the tip of a branch or stem, where you see new leaves unfurl on growing basil or thyme plants, where the plant cells are dividing like crazy, creating the material of those new leaves. It's called the meristem, and from it comes a hormone called auxin. Auxin is the stuff of apical dominance. Now, before all this scientific jargon makes you crazy, hormones are just signals, a biochemical way of shouting orders and getting things done. Of course, if you have teenagers you know about hormones.
Plants just do it in a quieter way - yet another argument for planting gardens.
Auxin has many roles in a plant, but in this case it makes apical dominance happen. The auxin produced by the meristem diffuses away from the tip of the stem and into the plant, becoming less concentrated as it goes. This is why, when you pinch the tips back on a basil plant the new stems usually appear from somewhere nearer the ground than the site of the damage. It also explains why, even if you do not practice pinching back, your herbs do eventually produce at least a few branches on their own. If the stems get long or tall enough, sooner or later the lowest buds don't receive enough of the auxin signal for apical dominance to occur.