The use of the “in-law” did not always just indicate the relationship that it does today.
In most modern uses of “in-law” a “father-in-law” is the father of someone’s spouse. In the same way a “mother-in-law” is currently generally interpreted as the mother of one’s spouse.
In earlier uses, particularly the early 19th century and before, a “father-in-law” could be indicating that the “father-in-law” was actually a subsequent husband of the person’s mother. Today that person is generally referred to as a step-father.
Similarly a “mother-in-law” reference could mean that the “mother-in-law” was a subsequent wife of the individual’s father. Today that person is generally referred to as a step-mother.
The “in-law” portion of the term stems from the marriage contract signed between the two individuals marrying.