As far as I understand, the m value "is a measured distance along a route" (similar answers here), thus similar to the mileage of a car driving over a highway. The m value defines the point on a line as the distance from a set starting point. So the m-value, even if not explicitely set, is somehow inherent in the very geometry of the line feature, defined as the distance from the first vertex of the geometry. Thus, every point of the line (not only vertices) has a well defined m value - comparable to an x and y coordinate, even if these are explicitely defined only for the vertices, not the points on the segments between vertices.
However, with a look at the QGIS documentation, I am confused. The image to explain the
Filter vertices by M value function there shows a line with 5 vertices, with m-values in this order: 0, 11, 5, 12, 8. This would correspond to the mileage going up and down, so something is wrong.
How is this possible if the route is measured from the start point of the line? Or did I misunterstand the concept and the m value relates only to the neighboring vertex, not to the start point of the geometry?