Out of the three #p# orbitals in the second and higher shells, only #p_z# is built from a single quantum state with a well-defined angular momentum about the #z#-axis (#m_l=0#). The other #m_l# values, #+1# and #-1#, correspond to a pair of complex conjugate wave functions whose amplitude at any location varies with time – one way for #m_l=+1# and the opposite way for #m_l=-1#. These varying amplitudes are unsuitable for forming fixed chemical bonds, so the only states we can see in those bonds are linear combinations that remain fixed as a function of time. One such combination is #p_x#; the other, orthogonal combination is #p_y#.
Because both angular momentum states enter into each of these linear combinations, a specific assignment such as #p_x=+1, p_y=-1# can only be our convention and not empirical reality (although the requirement that the signs be opposite is real, because all #p# orbitals taken together must add up to a zero angular momentum vector).
The lack of a definite #m_l# value for either #p_x# or #p_y# -- which also applies to #d# and other orbitals with nonzero #m_l# values – is ultimately a manifestation of the Heisenberg Uncertainty Principle. Usually the uncertainty principle is stated in terms of position and momentum in straight-line motion, but it applies also to rotational motion. In either the #p_x# or #p_y# orbital, we constrain the longitudinal position of the electrons around the #z#-axis because the lobes are oriented in a specific pair of opposing directions within the #xy# plane. If the position is thereby constrained, the corresponding angular momentum must have some uncertainty associated with it and thus we can’t have a single value of #m_l# anymore.
The #p_z# orbital, which is symmetric around the #z#-axis, has no constraint around that axis so it can be assigned a definite #m_l=0# value, but we would not be able determine a specific #x# or #y# component of angular momentum.