Those are synthetic benchmarks. The difference in application performance between the two is actually very small. In fact, there's only a 4 point difference in their Speedmark 6.5 scores (223 vs 227), and at many tasks the 21.5" 2.7GHZ is as fast or faster.
http://www.macworld.com/article/159692/2011/05/imacmid2011benchmarks.html?lsrc=top_1
Haven't you wondered why the iMac 21.5" scores 223 vs the 27" 222points?
PS: the 2.7GHz always with 65W TDP rather than 95W TDP in the 3.1GHz