<< What I didn't understand was why Data was smiling after he did the deed. Back then, he was incapable of feeling. >>
It was some type of virus-like compound that spread through touch, it was the same epidemic that had happened in the original Star Trek series. It wasn't just inhibitions that were gone, it made you go a little crazy - people start playing with the ship's environmental controls, taking showers with your clothes on, etc.
This had a similar affect on Data, somehow it was disrupting his positronic brain.