The selector selects entities although they are not in the currect Y position.
Tested it in a void world:
/kill @e[type=!player]
/tp 0 80 0
/execute if entity @e[y=70]
Step 3 returns: "{color:#FF0000}Test passed, count: 1{color}
"
Also:
/kill @e[type=!player]
/summon minecraft:marker 0 70 0
/execute as @e[y=69,dy=2] run say hi
Step 3 ignores the marker entity.
the x, y and z arguments only sets the selector origin; and if you set dx, dy or dz, the others will default to 0.
You're summoning at 0 70 0, but looking for the marker at ~ 69-71 ~
Using only x, y and z in selectors without sort, or dx/dy/dz or distance does nothing by design.