... because they can.
In every area, power and money don't change you, they merely reveal who you are.
In the UK, the officer calls you "sir" or "ma'am" and you call then whatever you want to ("occifer" and "cuntstable" being perennial favourites).
In the US, you call the officer "sir" or "ma'am" and they call you whatever they feel like (my interactions have almost always been polite, but I've witnessed "boy", "punk", "shithead")
Edit: see also https://en.m.wikipedia.org/wiki/Contempt_of_cop
Second, parent didn't say "you are X" but that they'd "venture a guess" based on the specific context of what had been said. So they don't need anything else (personal backstory etc) to make it -- just to apply what they know/believe is the general case for people making similar statements (positive view on the police behavior etc).
Even if you specifically are not white, it doesn't mean what the parent said doesn't apply in the general case: that whites generally have smoother interactions with the police, so their appreciation of how policemen are is more positive.