I think of it more like, "Uncle Bob is on a low-sugar diet now, you know. It really bothers him to not have those treats anymore, but it's better for his health. Since you're sitting by him, I don't want you to eat dessert, because I don't want him to feel bad that he can't have it."
It's just that nexus of "concerned and considerate" meets "what the--NO!" In that situation, I would want to plop down next to Uncle Bob with a giant piece of pie, but I don't think I actually would, because that would be punishing Uncle Bob for his wife being a busybody. Instead I think I would take my giant piece of pie and sit somewhere else, as that would accomplish her goal without compromising mine. No way would I actually go without, though. If Aunt Busybody is the hostess, she could have just not served any dessert at all. And if she's not the hostess, well, I guess she and Uncle Bob could have stayed home.
Generally, if it's the host who's trying to restrict something like that, I think it would depend on how confrontational it would be to defy them. I think they would be rude for making most restrictions; but in some cases I might also be rude for defying that and leading to a scene--discretion might be the better part of valor sometimes. But, I hope I would remember that they treated me rudely, and not accept invitations from them again. It's not something one should have to put up with on a regular basis.