Words become offensive in a few overlapping ways.
They may relate to something that is already thought less of. Sometimes it would be something only thought less of in particular contexts; most of us don't think particularly poorly of dogs, beasts, or cows but we do generally consider some of the traits that humans have that they do not to be valuable in humans.
They can relate to something once thought less of. Most people today really don't care whether or not someone was born in wedlock or not, but bastard remains an insult from having acquired been used in a way similar to the previous case at a time when people did.
They can combine these with an unease in talking about sexual matters, so calling someone a dick or a cunt combines the point about dogs and cows above (I very much like genitals, but I do consider them to be lacking valuable traits possessed by whole persons) with a salacious focus upon the sexual. Related are those relating to scatological matters, making shit, piece of piss, and asshole similarly offensive.
They can get strengthened through use by those of particular opinions; if a white person calls a black person a n****er, then we pretty much know that they're a racist. As such, not only do we have the history of that term expressed, but we have the gamut of racist opinion behind that instance expressed.
This can be one of the things that makes words offensive in context; if someone calls me queer while we discuss sexual politics and queer theory, I'm going to take zero offence from it. If someone calls me queer when it's irrelevant, or they are otherwise saying otherwise uncomplimentary things about me (even if those other uncomplimentary things are fair points) or is being generally negative about gays and bisexuals, I'm going to know there was offence in it.
They can be offensive by referencing negative views thought of others; "inside-out n****er" takes a racist view of black people and puts certain white people in the same category, so insulting both. "Special needs" can take the low view many people have of the mentally disabled and apply it to neuronormative people, and so insult both. Many words referring to women or girls are used as insults for men, applying a misogynist attitude so as to insult the targeted man as well as insulting all women. And so on.
Words can be offensive by their careless inaccuracy. "Retard" is not a useful word for describing mental disability, and so would only be used by someone with at least such low regard for people with mental disabilities as to dismiss them and therefore not use a more accurate term.
Similarly, if someone has a disability, that will certainly handicap them in certain ways, though societal and technological differences in different situations will strongly affect that degree of handicap whether adding to it (at the most extreme, in active persecution and murder) or reducing it (at the most extreme, in making it irrelevant in practice; consider how handicapped a person with extreme myopia would be in a hunter-gatherer society compared to one in which their eyesight can be corrected to 20-20 with glasses or contact lenses). Describing the person themselves as handicapped applies to them as a person what is not part of them as a person.
Inaccuracy can also be held to obstinately. If someone said I was heterosexual I'd consider that they were just making a foolish assumption since I'm in a straight relationship and have children from a previous straight relationship, it's a likely enough possibility. If someone insisted in calling me heterosexual when informed I am bisexual, then they are claiming that either I am liar or that they have a better idea of what it is to be me than I do, or quite likely both, which someone would only say to express contempt for me.
Last but not least, are we doing anyone a favor by labeling more and more words as "offensive" and therefore granting previously inoffensive words the power to offend?
Well, there's a difference between labelling a word as offensive, and describing it as such.
The reality is that words are used to offend. It is also the case that words are used with strong carelessness and that offends.
The idea that of Lenny Bruce's "Are there any n****ers here tonight?" skit, that if we all just used all the words all the time without meaning offence then the offence would be taken out of them is essentially true.
We would have to convince all the bigots not to use them in preference to other terms. They will not agree.
We'd have to find everyone who has lived with the experience of having them used hatefully toward them, often alongside much worse acts that anything being spoken, and give them an intensive course of psychological reconditioning so that the word no longer had any such associations for them. Good luck with that.
We'd have to either fix the language so that as well as all nuance having been lost, none was ever gained, and different groups didn't favour one term over another. Or else wipe all bigotry from the world, as well as from the language, so that such natural changes in the language never reflected a bigoted opinion.
In other words, we'd have to already start from a position in which nobody would be using offensive terms anyway.
For that matter, "offence" isn't particularly important. There's a million worse things than being offended and sometimes being offended is a good thing (I find it offensive that there are people in my country who can't afford a place to live; obviously I'd rather not find that offensive due to it not happening, but if it continued to happen and I stopped finding it offensive then I have become less in this, not gained).
What's important is that the offensiveness happens alongside other things, from micro-aggressions like being the person who isn't quite listened to or who is followed around by security guards through lack of access to education, housing and career opportunities, to an increased risk of suffering violence.
Recently RTÉ paid out a sum to a group of people who took offence at being called homophobes, and well maybe they were genuinely offended (though it's interesting to note that they insisted that the money be paid to them rather than to a charity), but if so they were genuinely offended middle-class white straight people who could marry whoever they wanted to marry and were unlikely to ever get beaten up because of which bar they were seen leaving. A good case could be made that for saying it doesn't really matter how offended the money-grabbing little shits were.
Really, offence isn't a terrible thing on its own, but it often isn't on its own.