Having taught 3-5 year olds for 10 years, I can almost guarantee that your child had had enough of Millie. Maybe Millie just wouldn’t leave her alone that morning, maybe they always have to sit next to each other, maybe Millie was encroaching on another friendship or maybe Millie had had something your daughter wanted earlier.
The frustration from these kind of things apparently stay with children this age for 90 minutes after the “incident”. They appear to have moved on but when they see the “offending” child again the feelings come back even if they cannot remember the specific frustration.
My guess is your daughter was fed up of spending time with Millie or couldn’t remember why Millie had upset her earlier. She then reached for a difference between herself and Millie to justify why she didn’t want to be next to her.
I hear this day in and day out. “Poppy can’t play because she’s not wearing pink.” Or “Arthur doesn’t have a sister so he can’t play.” Or “This game is only for people with straight hair.” Occasionally the difference they stumble onto is racial loaded, but at 3-5 making the statements in this way, they really are not racist. It requires a conversation afterwards, but these children are not racist!
We encourage them ALL THE TIME to notice similarities and differences in their environment, in pictures, between groups of objects and with each other. Anyone above thinking a three year old is racist for noticing a different skin tone is bonkers. People have different skin tones and that is a fact children need to learn and accept without any weight on it.