My late 2009 iMac fans rev up once in a while. It gets quite loud, but if I click fast of hit the escape key many times it tends to go away. Weird.
I have never found a really clear and satisfying explanation.
My best guess is that the hardware is monitoring the fan speed and heat and revving up the fans sometimes to test the hardware or maybe just to move the dust inside? No idea really. All I know for sure is that it didn't do that during the first year. It's a fairly minor annoyance as it goes away quickly if I hit the keyboard or mouse. If I don't interfere, it may go for a minute or so.