You crossed legally. You didn't swim or walk through the desert. They have xray scanners, dogs, and many other methods to inspect vehicles. You may not have even noticed you were inspected.
Nothing racial about it, many races from many nations crossed illegally. It's about legality, not race.
No, the scanners and imaging equipment do not fit large trailers like I was towing, so I had to bypass all of the equipment to a manual inspection area, but then they waived me through.
Racial profiling - as well as other types of profiling - are absolutely a major factor in US border enforcement, and are currently done openly and legally. Your odds of being extensively searched are astronomically higher if you are crossing legally but have an accent or darker skin tone. ICE and border patrol openly use racial profiling, and recently won a supreme court case Noem v. Vasquez Perdomo allowing them to continue doing so. They wouldn't fight all the way to the supreme court and win for the right to racially profile people if they didn't even do it!
Moreover, the job of a border agent, especially under the current administration actively seeks out and recruits employees that are attracted to the idea of a career that allows and encourages xenophobia, bullying, and racism. Sadistic people like Greg Bovino, who revels in fascist imagery and illegal brutality rise to top leadership positions. The recruitment materials for these jobs use white nationalist and white supremacists imagery and slogans- often using images stolen verbatim from white supremacist websites and forums.