Couple of things come to mind, having done martial arts training and using lateral lunges for stretching quite a bit. It is either a hip mobility issue where they’d need to work on increasing the range of motion in their hip. Or, they’re bending the leg due to compensation from having difficulties balancing (while trying to keep their back straight possibly, or their left leg not being strong enough to handle the weight).
Some further diagnosis: at what stage of performing the exercise are they bending the leg? Eg. if it’s quite early on, it’s likely a mobility issue. If it’s later on, it could be a way for them to keep balance due to weaker core/stabiliser muscles.
Also, does it make a any difference if they try to keep the foot of their straight leg flat on the floor at the end of the movement, or do they find it easier to rotate their foot slightly clockwise and balance on their heel? If they find it easier to balance it on their heel it indicates they’re inner thigh is not very supple.
Finally, it just hit me, is it just their right leg that’s not straightening? (what about left?)