HMMM?

Why does tasty mean that a thing tastes good and smelly mean that a thing smells bad?