I am not sure if the question is an illegal one, however, I do understand why that question was asked. You see, the company you are applying for is trying to mitigate any loses that may occur if a member of your household tries to talk you into doing something illegal involving your work place. This could be as simple as them trying to prevent office supply theft, theft of office equipment or perhaps theft of money from the cash register....all with your help to commit such crimes.
I am not saying, nor do I believe that if someone in a family has a criminal record, the rest of the family is subject to scrutiny and possibly losing the opportunity for gainful employment. That is wrong all day long.
Howsoever, in today's day and age, theft is responsible for billions of dollars lost and you know who pays that ultimate price??? Every single person who buys anything in a store. We all pay for theft, no exceptions.