The "Dimension" tag of a summoned entity will always default to 0, no matter which dimension the entity was summoned into. The tag is not updated until the entity changes dimensions, such as travelling through a portal.
Steps to reproduce:
- Go to the nether.
- Spawn a cow using a spawn egg
- The result in the chat window will be "Found Cow"
- Kill the cow
- Summon a cow using /summon Cow
- Run the same testfor command again
- The result in chat will be "Cow did not match the required data structure"