Face exists but no edge I've been learning Blender for a while now, and there's this problem I couldn't figure out the answer, even after searching for it.

There's this edge I want to move, on the same z axis :



And when I want to move this edge like this :



There's still this face existing even if I moved the vertices and the edge. How could I remove this overflow ? Why does it even exist ? I'm using Blender 2.79. Thanks in advance for your time.
It acts like this because it tries to create a face between your 4 vertices. To do what you want to do you will have to create a transverse edge like that: