The reason that you will have 12V at the pin at the ECM, with the key on, is that the 12v ignition signal is passed through the coil of the relay, and will be found on any connected wire for any length, as long as a ground signal is not applied to that opposite side of the coil. Once ground is applied, that entire length of wire will then have a ground potential, and will no longer read at 12V, but be equal to (or very close to being equal) to ground.

Same thing happens with conventional light bulbs and many, many other electrical items.