I think its what type of minority you are (say Chinese versus Indian vs Mexican), and what type of car you drive. If you’re driving in a high end German car, you don’t get hassled much…know this to be true from many people. You drive not such a nice car, and don’t look obviously white, well, they will ask a few more questions.
I am a US citizen, but AZ is the ONLY border checkpoint where I was asked if I was American born US citizen. In CA, just asked if US citizen. Wonder if I would have been harassed if I had said no.