does it have anything to do with the bankruptcy process?
Sure. There are some cases where the filing of a bankruptcy can affect the success of a naturalization process. I am not an immigration attorney, but many on this site who practice both bankruptcy and immigration are of the opinion that bankruptcy could affect your ability to become a citizen or affect a persons status.
Communications between you & your attorney are always confidential. There would be a problem with ethics if your bankruptcy attorney were to discuss your immigration situation with anyone else, but no ethical issue to ask you the question.
Why would the bankruptcy lawyer be asking you immigration questions?
Well, first off, s/he needs to be sure your social security card is valid. If not, you will need to apply for a TIN to be able to file Bankruptcy. Use a fake social security number in a bankruptcy will get you into trouble for sure.
Second, like myself, this attorney may have friends that handle immigration matters & could provide you with a valuable referral to resolve any problems.
If you don't like the attorney, that's fine - find someone you feel comfortable with. But it is the job of every attorney to ask questions before agreeing to take the case. Don't be so sensitive!