In my day job, I work at a large Harley-Davidson dealership, and I've worked many retail jobs before, so I'm fairly familiar with the business. What that salesman did is break one of the cardinal rules of retail. Regardless of your feelings toward ANY person in your store, you must AT ALL TIMES project a friendly and helpful manner to potential customers. Never badmouth your clientelle in front of anyone who might be a customer, or worse, a potential Secret Shopper. The bad review from that kind of thing could kill your business, not to mention driving away potential customers through simple word-of-mouth.
Regardless of whether or not the vast majority of people walking into your store are "into" photography or not, every single person is a potential customer, and you should treat them all accordingly. We had a customer come in about a year before I started working where I am. He mentioned to a salesperson that he wanted to buy a particular motorcycle. The salesman looked at the clothing the man was dressed in and said "You don't have enough money." The potential customer then proceeded to pull a roll of $100 bills from his pocket, about $20,000 in total, and said "You just lost a sale." He then went to one of our nearest competitors and bought his motorcycle. He came back recently to buy some parts for a project, and because of the positive dealings he had with me when I was working at the Parts counter, he has since bought a new motorcycle from us. You shouldn't care whether someone is buying a camera to turn professional or go out into the parking lot to smash it. A sale is a sale, and right is right. If it was me, I would have complained to the management of the store. That salesman displayed a horrendously unprofessional attitude.