Actually the "technology" behind wisdom teeth is quite smart. How many organisms feature resources timed to "spring" 20 or 30 years from birth, to replace lost "components"?
You experience them as painful because your teeth don't rot as they used to; until the XX century, it was common for people to lose many of their teeth by the age of 30, so they were grateful for an extra set. They'd probably be dead before 45 anyway, so just a few would suffice to chew your way through the last years of your life.