Yawning isn't just for flushing the lungs of CO2, it's also for sucking colder air up into the sinus cavity to meet the blood/brain barrier and cool your frontal lobes.

Top of the list would be consciousness, although I'd say we'll have a handle on that in the next 50 years as we get closer to creating a real AI.

Laughter, dreaming, morality - there are evolutionary bases for all these.