Did the cashier give off body language suggesting they closed the line due to not liking the guy behind you?
I don't know under what circumstances a cashier might open a line only briefly, but I often realize I forgot something right when I start an activity.
But yeah, if they caught a glimpse of the guy behind you and then closed down in a pissy way, I'd probably start by offering to be a supporting voice during a complaint to the store management. If it's any kind of pattern, the cashier will likely be out of a job.
Human health and nutrition is, of course, highly complex. A substance may be generally healthy in one formulation/concentration, and tend to cause health problems in in another.
A "whole food" is not strictly defined, but is "Group 1" in the Nova food classification you mentioned.