There's absolutely no way you can stress the nervous system and build muscle and bone density as efficiently as with lifting weights.
Calisthenics, which is what Yoga is, body weight exercises, can never achieve the same results. You can come close in a lot of ways, one legged squats etc, but ultimately, you cannot work your back and your core as effectively as with a 1.5x body weight dead lift.
Note on bias: I do calisthenics...and weightlifting (https://www.instagram.com/p/CScdKCjr_0c/)
No knock on weight lifting though, it's great. But for most people getting on a yoga mat and doing some calisthenics is a lot more approachable than learning how to use a gym properly for their bodies.
However spending hours a day doing gymnastics is plenty to maintain that level of physical strength and even slowly improve.
For me I saw 10x better results with calisthenics than intermediate powerlifting because the amount of volume I could get in was much much higher on compound exercises.
It's only when you get to an advanced level of strength, where advanced calisthenics exercises don't quite cut it, and almost no one gets to that level.
I'm not sure about that - have you looked at the strength required for some of the exercises people do on gymnastics rings? Things like ring planches, maltese, victorian cross (once thought to be impossible) etc.
Same goes for stretching as well. A good stretching routine is going to get you much more flexible faster than doing yoga. Yoga has stretching in it, but again, it's unfocused and tends to have a very poor sense of progression.
Yoga is probably more akin to a sport. You can keep fit by playing sports, depending on how much work you put into it. But if you're trying to build strength, cardio, or flexibility, you're going to get much better results with a routine that focuses on those.
That of course assumes that building huge or strongest muscles is universal goal. It is not.