Is it unhealthy to fail this bike fit and why? Recently, on a beginner MTB lecture, I learned that the pedal axle should in no part of the stroke be horizontally in front of the knee. Not observing this is unhealthy for the knees.

Also, here (btw great video) they explain a similar thing. For a "correct fit", the knee should line up with the pedal axle.

Currently I am riding my little sister's mtb. The seat is high enough, but even being slided maximum to the front, I fail the above test miserably (the seat tube is quite angled). A couple of weeks of short rides, and my knees already hurt constantly (maybe placebo effect?).

Why would having the seat too far back be unhealthy for the knees?
This principle, "Knee Over Pedal Spindle" or KOPS is archaic and wrong. It assumes ideal morphology.

I am about 6ft/185cm tall. For my height, I have comparatively short legs. I have large feet, size EU48/UK13/US14. KOPS gives me inappropriate knee and ankle angles.