The discrepancy in measurements happens when your object has been scaled in object mode, but the transformation has not been applied.
As an example, look at this perfectly regular cube (2mx2mx2m) in edit mode:
What is wrong with it?
Look at the scale section on the panel in object mode:
If you select your object in object mode and press Ctrl A and select Apply Scale
The scale of the object will reset to 1,1,1
And the measurements in edit mode will reflect the real measurements of the object.
Without applying transformations, you can also choose to display local or global measurements:
The measurements in Local units are Relative to the Scale, and show that the cube is 2x2x2, whereas the Global units show the Absolute measurements, revealing that the cube is no longer a cube, but a cuboid that is 4m tall and 2 meters wide.
Why should you care for local or global measurements? There are many operations that use the scale and rotation of the object and not its absolute dimensions
Quote from the blender manual
Applying transform values essentially resets the values of object’s location, rotation or scale, while visually keeping the object data in-place.
The object origin point is moved to the global origin, to rotation is cleared and scale values are set to 1.
For simple cases you won't notice any difference the 3D View or rendered output, however modifiers and constraints may depend on object transformation.
Beveling, UV unwrapping, physics simulations, booleans, and many other functions will use the objects relative dimensions and will give unexpected results if the transformations have not been applied.
Please read: Why is it important to apply transformation to an objects data?