It's impossible to tell if the "trick or treating" question was meant offensively or not since it's not shown, but somehow I doubt it was meant as "I know what your clothing represents, and I'm going to demean you to your face".
Assuming the clerk didn't know what they were wearing, she was:
* Ignorant of their clothing's meaning -> yes
* Way off to be guessing trick or treating a month early -> yes
* In a position where she should be educated and give a sincere apology -> definitely
But I don't think flying off the handle and berating her was exactly the punishment that fit the crime. It's not like it's black people's jobs to educate white people about their culture, but if someone's (presumably) never seen such a thing, learning about it by being screamed at isn't exactly constructive.
If the clerk DID mean the comment offensively, then the verbal lashing was probably totally warranted... but she seemed pretty apologetic while being yelled at