I'm answering this is a round about way, by understanding the perspective of the host.
Most people who have guests, want to please their guests, make them comfortable and welcome. The host wants the guests to enjoy their dinner and come away from the visit, with a feeling of being welcomed and comfortable.
Most people are not offended by someone not being able to eat something they are served, they are more offended by someone not liking their cooking.
Different people have different definitions of what a vegetarian is. It requires clarification. As I've know some people who will eat fish and call themselves vegetarian, others are closer to being vegan. So it really does vary and depends upon the host's experience. I wouldn't like to assume it was deliberate, if it was, it's not the sort of company one would like to keep.
I live in a part of our city where there is a large Jewish community. I myself am not Jewish. We have many Jewish friends who practice their religion with varying degrees of strictness. Some will eat bacon, others are completely Kosher.
As such I've hosted parties and had people who will not use our oven to heat food, as it's cooked non-Kosher food. I've served meals and had people pick through things and eat what they can or not eat at all. Usually these people will bring their own food, without my prior knowledge.
These are all things I'm well used to now, after living here for many years, but when it first happened, I was mildly surprise, but mostly I felt bad that I was unable to provide them with food they could eat. They never offended me, as they explained their beliefs and how strict they were and I actually found it interesting. I would never expect someone to eat something they were not comfortable eating.
The key is politeness, show an appreciation of the effort the host has gone to and explain. With open and clear communication, that can help, the host may have something else that you can eat.