i.e, suppose you wanted to check whether the nearest player was standing on grass or not. One way that would make sense would be a command block with the command "/execute @p ~ ~ ~ testforblock ~ ~-1 ~ grass". However, any comparators sticking out of a command block will be powered no matter what: the game only checks whether the execute command succeeds, not the testforblock.
There is also a problem using /execute testfor. I had this command on a clock:
/execute @e[type=Zombie] ~ ~ ~ testfor @a[r=10]
but even if I was out of range, as long as there was a zombie in the world, the comparator always outputted