Another point to mention is that you can stretch a muscle while it is passive and while it is active.
For example, when you are doing a standing forward fold, such as you would do to begin surya namaskar, your lower back and hamstring muscles need to work to hold the upper body up while bending forward. And at the same time, they will also move into a stretch. So essentially the hamstrings and lower back muscles are contracting and stretching at the same time.
Some believe that you cannot stretch a muscle while it is being contracted… others believe you can.
An example of a passive stretch is Ananda Balasana (Happy Baby Pose). It’s passive because the muscles you are stretching, the hamstrings and lower back muscles, are not contracting while in the pose.
My experience in my own body is that both are beneficial. The first provides strength and tone to the muscle, while reinforcing length, while the second improves flexibility.