the ending pulls the accent ahead with it: MO-dern, but mo-DERN-ity, not MO-dern-ity. That doesn’t happen with WON-der and WON-der-ful, or CHEER-y and CHEER-i-ly. But it does happen with PER-sonal, person-AL-ity.
This is one of the most irritating things in the English language to me. Studying Japanese, one of the first things you're taught is that there's no stress on any syllable more than any other when saying a word. It's a Mora-timed language, where English is a stress-timed language. Mora-timed languages don't put stress on certain syllables the way we do in English. By changing the way we are using a word, and thereby changing our intonation, the language just keeps getting more confusing; stress one syllable wrong and everyone in a three mile radius will go, "Why did you say that like that?"