Stretching and making ourselves more limber helps avoid injury. I am not very limber and if I am in some sort of accident where my leg or arm is forced farther than I can naturally stretch I will tear the muscle.
Yoga is not just stretching, but also holding positions that builds strength and stamina in the muscle. Some calories are burned during yoga and building muscle usually leads to incresing metabolism a little in general.
Many people also feel it is meditative. The person can focus on the exercise and not be rumenating about their day and life.
I personally don’t like yoga. Not that it matters. I can see why many people do and why it is beneficial.