It is still possible to measure the quality of software (or other products) simply by defining a metric that proves quality and testing for it
If I were to write 2 simple functions that reverse an array, and one successfully reverses an array and the other just randomizes it - despite never using this function, we could all agree that function 1 is of higher quality than function 2.
This is an extreme example but the same can be done for, lets say, speed or error handling.