No, they're not legally illegitimate, but let's not pretend "illegitimate child" is an uncommon or outdated phrase. It still gets used a lot unfortunately, and it's application is mostly social, and mainly applies to children born to people in positions where such a child would be considered a scandal, so the phrase…