One of the reasons compound lifts moving heavy weight are so important is the effect they have on your entire body. Doing heavy squats recruits nearly every muscle in your body. But it doesn't just stimulate those muscles, it also stimulates your central nervous system.
Doing something hard enough to get the attention of the CNS is important to making progress, since, for example, the CNS will respond by releasing more hormones such as growth hormone.
Doing full squats with your bodyweight on the barbell 15 times (3 sets of 5) is like screaming at your body to get in shape and it will respond. Doing yoga might be like gently asking.
This isn't to say yoga isn't beneficial, it's just not the most efficient way to get in shape.