Both moss and weeds have inherent benefits. Often they are quite neat plants. Too bad they often grow in the wrong place.
Nobody likes moss in the lawn. Although it is always green, it's hardly the kind of greenery you want in a lawn.
What moss in the lawn really depends on is difficult to answer. As usual, quitting the question that the pH is too low is not enough. Other, least likely causes are nutritional deficiencies, shadow, poor water drainage and packaging.
But - there are lawns, well-fertilized, well-drained, high pH, and in full sun, yet filled with moss. Such is not easy to explain.
In the trade there are moss-killing agents that are effective against the moss but spruce the grass. However, these means do not guarantee that the moss does not return. Help the grass to better competitiveness by fertilizing regularly. It can be the primary remedy.