so, dharma and moksha in Indian philosophy can be contrasted as "worldly pursuits" on the one hand and "spiritual pursuits" on the other.
and different Indian scholars disagree on whether the two are compatible or not. according to some, the path to moksha cannot be attained while also pursuing dharma, and vice versa.
and i suppose that's where you get monasticism, an concept that also exists in Christianity.
the other school of thought is where you do the good works but in an enlightened way. a union of dharma and moksha.
a third option is a union of people who work together as a unit, according to what suits them best, but with a common understanding that these are different roles.