However, discard the desire (kama) and material wealth (artha) if
contrary to Dharma; as also, any usage or custom or rules regarded as
source of Dharma if at any time they were to lead to unhappiness or
arouse people's indignation.
(Manu Smriti 4.176)
Basically what this means is that scripture must be reasonable. Otherwise a Hindu does not have to accept any thing simply because it is in scripture. I have given below 2 examples of such reasoning.
Yoga Vasistha II.18 says:
yuktiyuktamupādeyaṃ vacanaṃ bālakādapi | anyattṛṇamiva tyājyamapyuktaṃ
padmajanmanā || 3 ||
The remark of a child is to be accepted, if it is in accordance with
reason; but the remark of even Brahma Himself, the creator of the
world is to be rejected like a piece of straw if it does not accord
REF: Vasistha's Yoga translated by Swami Venkatesananda, p 35.
Sri Vachaspati Mishra, another Advaita Vedanta philosopher, says,
Na hy āgamāḥ sahasram api ghaṭam paṭayitum īṣate (Bhāmatī,
A thousand scriptures cannot make a jar into a cloth.
REF: Quoted by S. Radhakrishnan in his book, Indian Philosophy, Volume 2.