This is ascribed to a Doppler Shift that changes periodically with time because we are seeing one star in orbit around another.
This is interpreted as the result of two stars in orbit around one another. In analogy with the Sun/Earth system, the star with the larger orbital velocity is the less massive.
With a Double-lined binary it is possible to measure masses of the stars to within a factor that depends on the inclination of the orbit with respect to the line of sight.
Because of the eclipses the orbital inclination is known and it is possible to solve for the mass of each member of the binary. The details of the light curves also give direct information about the details of the light distribution across the face of each star and on the sizes and temperature of each star.
There is a pretty ``steep'' relationship between Mass and Luminosity in the sense that more massive stars are more luminous. For the main sequence:
The Main-sequence in the H-R Diagram is a Mass sequence! For each position along the main sequence there is a corresponding stellar mass.