There's two schools of thought in the contemporary poskim.
1.people go to restaurants to eat the food that is typically served in the restaurant. There are exceptions, but that's the rule. And that's the assumption when you see someone in a restaurant.
Yes, I don't get that one. I mean, I believe you that poskim say it, but I just don't hear it too well.
Sure, if the only data points you have are (a) most people go to restaurants to eat their food, and (b), this person is in the restaurant, then the most logical conclusion is that this person is eating the food. But that isn't all the data you have.
If the only data you have is that (a) most cars don't have electric motors, and (b) this is a car, then the most logical conclusion is that this car does not have an electric motor. But if I told you another data point, that (c) this car has a decal that says Toyota Prius, and that (d) most cars that say Toyota Prius have electric motors, then you should consider all 4 factors together and you should conclude that this car probably has an electric motor, even though most cars don't.
So in my case, you should add a third and fourth data point that (c) I am wearing a yarlmuke, and (d) most people who wear yarlmukes don't eat treif.
I mean, once you're only going to pick certain data points, I will note to you that most people who fly first class also eat the food--which is treif. But why go that far? Most people who cross the street eat treif. Most people who pick their nose also eat treif. Most people who shop at Stop & Shop buy treif food there. Most people who buy coffee at Starbucks also buy pastries that are treif. Most people who go to the zoo on chol hamoed pesach buy the goat food for the petting zoo which is chometz. Most people who go to baseball games buy hot dogs.
Maris ayin--what people see. You should look at what you are doing through the eyes of the people who will actually see you and consider if they will think you are doing something wrong, based on all the things they will see.
I don't know any other way to understand it.