I know that, a century or so ago, a large part of the purpose of etiquette was to avoid any strong emotions having a chance to develop or be expressed (and thereby, if they were acted upon, they would make someone behave as though they were from the less polite lower classes). So a gentleman wouldn't look at a lady changing not because he cared about her privacy so much as that he didn't want to be affected by lust and subsequently behave like some sort of uncivilised youth.
These days, it's more about respect and making society work smoothly. The purpose of it is, as I've come to understand it, fundamental to civilised society. If we all did what suited ourselves best without consideration of others, then society would not work. I always feel that etiquette is about doing what you can to smooth things for others, to a point. Where that point is changes depending on the relationship of the person to you. I'm willing to do a lot more for my husband than for some random person on the street, for example. I would make arrangements to quit my job and care for him full-time if he were to become severely disabled, say, but wouldn't do this for someone I just met. More commonly, if you're hosting a dinner, you do what you can to make the dinner go smoothly and without unpleasantness so everyone can enjoy themselves, but not to the extent that you bring about your own financial ruin or anything. It needs to be tempered with what is practical and feasible.
So it's not so much about hard-and-fast rules as some people might like to think. In different regions or countries, for example, following one rule might be seen as varyingly polite or rude. Following a rule blindly is not polite, because it means you're not thinking of others. It's rude to slurp soup in England, for example, but very polite to do so in Japan. Your behaviour should change depending on who you are with and what their relationship to you is, rather than always acting in a set way like a robot. You can't say hard and fast what is rude or polite, since these are often not universal, but depend on context.
With this mindset, it's not too hard to determine what makes a behaviour rude. That said, there will be people whom you cannot please, and people who are rude to others, and you should not bend over backwards trying to compensate for them. Again, it needs to be tempered with what is practical. If someone is absolutely determined to make a fool of themselves or to be unpleasant to others, then you are not obligated to go to great lengths to stop them. Possibly, instead, you could help others avoid being subject to their behaviour by not inviting the troublemaker to events where they will stir things up. If someone's being unreasonable, etiquette does not demand that you reward them for it (by being a doormat or covering for their rudeness to others), since this will often be at the expense of yourself and/or others, which is contrary to the purpose of etiquette.
That's my feeling about it anyway, based on musings over the last few years. Maybe someone else has a more interesting way of looking at it?