Fans run after Macbook Pro lid is shut
This typically happens when the CPU has been working and the system needs to push more hot air out. I think the firmware within the machine manages this but I'm not quite sure. My air does it and I just put it away anyway. I've never experienced anything bad with it.