You might want to look up the word "legitimate" in a dictionary some time. It has more than one sense. Which one was intended ought to be apparent to anyone willing to exercise common sense.
Cordially,
legitimate, le-jlt'-te-mate a. born in marriage (Samuel Johnson, A Dictionary of the English Language, 1755)
The Shorter OED gives a second meaning of "conformable to law or rule; lawful, proper".
It also notes that it was sometime used in a transferred sense of "real" as opposed to "spuriuous". but notes that usage as obsolete.