Why is X mirror not working on a mesh?
The mesh isn't exactly symmetrical.

This behavior is intentional. Meshes which are almost (but not quite) symmetrical wont detect vertices as mirrored.This is needed to avoid problems with high-poly meshes where vertices may be very close.

To resolve the problem, you can use the Snap to Symmetry tool.
See: Mesh -> Snap to Symmetry.

This has options to select a distance threshold and choose which side of the axis to use.