This is a pretty common preposition, along with the slightly more formal in spite of. It’s not a word you might use every day, but it’s common enough, especially in written English.
Still, when you think about it, it’s a bit odd, isn’t it?
This oddness is a little more apparent in in spite of, if you take each word on its own. Spite really stands out then, doesn’t it? A desire to hurt or offend someone: what’s that doing in there?
This isn’t just one of those cases of words being similar coincidentally. Despite and spite share the same etymology as despise, coming from the Latin despectus, which literally meant looking down on. The Old French phrase en despit de (in contempt of) developed from this, and this was translated into English as in despite of, later shortened to in spite of, and despite.
It might seem unusual for these words to have changed from their original meaning of in contempt of to their much milder modern usage. But if you think about it, there’s still a logic to it. We usually follow despite/in spite of with a negative condition that we have to overcome or at least ignore. For example:
In spite of the weather, we still went out and had a good time.
We manage to eat pretty well, despite the fact that we don’t earn a lot of money.
Whatever we put after despite/in spite of is always something that’s negative for us on some way. We therefore don’t like it, and even if we don’t really feel in contempt of it, that’s not too far from the truth, and it makes sense that we still use despite, in spite of it not having the strength of meaning it used to.