There is no phase transition between Earth crust and atmosphere. Phase transition means the same substance changing state of matter (like ice melting), not different substances being in contact (like nail in the water).
And the Earth surface is at zero, because we decided the surface is at zero and we measure everything from the surface. It is like asking why all distances from home are measured from home, as if the home was the center of the world. Well - if you ask what is the distance from the home to the gas station, don't be surprised the distance is measured from home.