Swami Chandrasekarendra Saraswati in the book Hindu Dharma: The Universal Way of Life explains satī or sahagamana as follows.
Sahagamana
When people nowadays talk of "satī" or "sahagamana" they mean it to be a
custom in which the widow is forcibly thrown into the funeral pyre of her
husband. We do not know for sure whether such an act of cruelty was indeed
committed at any time in the past in any part of our land, that of forcibly pushing a widow into the funeral pyre of her husband. In any case satī has never been a widely practised custom. Only women of exemplary chastity and devotion, who did not wish to live after the passing of their husband, resorted to sahagamana. I have heard stories of such pativratas in my childhood. When the relatives lamented, "Oh, you are burning yourself alive," the widow exclaimed, "This fire does not burn me. I am dying in the warmth of my husband's embrace." Such noble women died with a smile on their lips.
...
A wife of exemplary pātivratya falls dead on the death of her husband. In
the story of Kaṇṇagī we come across such an example of devotion. When the
Pāṇdyan king dies owing to his profound feeling of guilt, his queen also dies with him. There is a similar story told of Padmāvatī, wife of Jayadeva, author of the Gīta-Govindam. In order to test her devotion for her husband, the queen light-heartedly tells her that Jayadeva, who had been out on a journey, was dead. Thereupon Padmāvatī falls dead. The queen is filled with remorse for her
thoughtlessness and it is said that Jayadeva was able to restore his wife to life with the grace of Kṛṣṇa.
Only women highly devoted to their husbands resorted to sahagamana.
They were not forcibly thrown into the fire and were indeed prevented from
taking such an extreme step. When Pāṇḍu died, Mādrī, one of his two wives and mother of Nakula and Sahadeva, ascended the funeral pyre of her husband as
expiation for her being the cause of his death. The great men who permitted this
act of sacrifice prevented Kuntī, the second of the two wives, from taking a similar step. They said to her: "Desist from such an extreme act. Your duty now is to bring up your own children as well as Mādrī's."
...
Like sannyāsa, sahagamana has never been compulsory. I will tell you an
important reason for this. The dharmaśāstras deal extensively with the conduct
of widows. If everybody was expected to be a sannyāsin there would be, as I said
before, no need for cremation to be brought under the purview of the śāstras.
Similarly, if every widow was expected to immolate herself in the funeral pyre of her husband, where would be the need for a separate code of conduct for them
(that is for widows)?
Nobody can foretell when the hand of death will strike. It can come in
one's childhood or during the time one is a householder. So everyone cannot be
expected to die a sannyāsin. If the śāstras insist that on the death of a man his widow must also be cremated with him, then there will be no need for codifying "vidhavā dharma" (code of conduct for widows).
[Hindu Dharma » Gṛhasthāśrama » Sahagamana]
(You can read the whole chapter here)
Although in Mādrī's case, I'm not too sure if she really performed the satī. In his report titled Interpolations In The Mahābhārata, M. A. Mehendale of BORI says:
Another similar example is from the Ādiparvan. It is usually believed
that Mādrī committed satī after the death of Pāṇḍu. In support of this belief
we have a specific statement in the Mbh. which occurs without exception
in all the versions and hence forms part of the constituted text. That statement
tells us very clearly that Mādrī mounted the funeral pyre of Pāṇḍu and burnt
herself with him. (taṃ citāgatam ājñāya vaiśvānaramukhe hutam / praviṣṭā pāvakaṃ mādrī hitvā jīvitam ātmanaḥ 1.117.28; also 1.116.31). However, it is not so well known that immediately after this stanza we have another one which also occurs in all the versions and hence forms part of the constituted text.
The latter stanza directly contradicts what is said in the preceding stanza.
According to this stanza the sages who, after the death of Pāṇḍu, brought
Kuntī and the young Pāṇḍavas to Hāstinapura, also brought with them the two
dead bodies of Pāṇḍu and Mādrī. They handed them over to the elders of the
Kauravas and asked them to perform the due funeral rites (ime tayoḥ śarīre dve... pretakārye ca nirvṛtte pitṛmedhaṃ mahāyaśāḥ/ labhatāṃ... pāṇḍuḥ.../
/ 1.117.30-31). Then, in the following adhyāya (1.118) we have a detailed
description of the cremation of Pāṇḍu and Mādrī. Both these accounts could
not be true at the same time. Either Pāṇḍu was cremated on the Śataśṛṅga
mountain and Mādrī mounted the funeral pyre, or cremation did not take place
and the dead bodies were brought to Hāstinapura. Nīlakaṇṭha's feeble attempt
to remove the contradiction by interpreting śarīra 'body' as asthi 'bone' is not
convincing. Sukthankar, following Hopkins, has already expressed his
dissatisfaction with Nīlakaṇṭha's explanation.
Clearly here, as in the above case, we have conflation of two different accounts of the same incident. The interpolator while borrowing stanzas from a different account and inserting them in his own has shown scant regard for the contradiction his interference with the received text involved.