1. B&H Photo is obviously able to make some profit on these sales, even at the special show price given with the coupon code, otherwise, they wouldn't be distributing the fliers to anyone who attends these events.
2. Many of the people who see the online coupon codes buy from B&H even though they may have otherwise bought their equipment somewhere else.
So overall, the online publicity of these coupon codes are good to increase B&H's revenue.
Now there is the question of people who did not get a physical copy of the show flier with the coupon codes and who would have bought their equipment from B&H Photo at regular prices but found out about the discount codes online and used them with their order. This would result in some marginal revenue loss (and possibly somewhat more significant profit loss) for B&H Photo. However, my guess is that many of these people are loyal B&H customers, and in many cases, they are tempted to pull the trigger because of the coupon code, so overall, online publicity of the codes should be still good for B&H Photo.
If these codes were hurting B&H Photo's business, they could simply choose not to publish them any more. Alternatively, if B&H Photo really wanted to limit the number of uses for the codes, they could choose to get people to sign up at their booth (simply scan their badges) and email one-time use codes to show attendees .