Me (a white guy) would frequently do ridealongs with some of our black installers and I would see this kind of treatment from customers regularly. I wasn't dressed like I was doing install work (business casual) and was clearly younger and would tell the customer in advance that I worked in X department and was just learning from the installer.
People would talk to me like the installer wasn't there. It really didn't matter what demographic either, it was pretty universal. Except for one older lady. She didn't even want me in her house if I wasn't there to physically work on her service. I liked her.