Racism bothers me just as much as anyone, but in this particular case, I really doubt you're facing racism. US CBP harasses everyone. I get harassed by both CBSA and CBP routinely, and I'm white.
It just goes with the territory, if you breathe, CBP will try their best to make your life miserable. CBSA, too - you've just got lucky.