Hamstring Anatomy

We can see that the hamstrings can affect both the hip joint and the knee joint because the muscles pull across both the joints. Taking some tension out of the hamstrings at the knees lets you flex more at the hips and vice versa. This is why bending the knees in a forward fold lets you fold deeper.
So, getting back to our question. What could be happening to our forward folding yogi? My guess based purely on anatomy would be that while standing, our yogi is doing her forward fold mostly from the low back rather than flexing at the hips where it is intended. If the hips are not flexing as much, the hamstrings will have more room to lengthen at the knee, so the legs can be straightened. While sitting, the yogi would need to flex at the hips more to bring her body forward in order to not fall backwards. Since the hips would now be flexed more, this would stretch out the hamstrings at the hip and there would be less length available at the knees, forcing them to bend.
Conclusion
- low back
- hips
- and knees.
Namasté