This kind of profiling is not unique to CBP. Similar behavior has been observed from people I know in the UK and Germany in the days when security was not as tight as it is today. In those days European Citizens could show the cover of their passport and be admitted without showing the photo page. Non-white people have been asked to show the photo page when white people have been admitted without doing so - sometimes this has occurred even when groups of people (white and non-white) are travelling and are clearly together – the non-white people have been asked to show their photo page on the passport. Since in most cases there was no conversation this was purely based on looks – i.e. racial profiling
Someone I know of South Asian descent was visiting Germany at the time when people could pass through without showing the photo page. She was in line and approaching the officer. Everyone in front (white) were being admitted by simply displayed the passport cover page. When it got to her turn she was asked to open up the passport and show the photo page. At this point I think she had been in the UK as a citizen for over 20 years. In any event she got pissed and asked to see a supervisor. Needless to say at that point she was admitted without any further issue and without having to show the photo page.