You are confused between social evils and the religon. Religion never said to follow sati. Because of muslim marauders, sati was practices in North India where muslim attack was more. It was never practised in South India and as far as I know Maharashtra also.
In Mahabharatha and ramayana, so many widows are there. It started with evil cult coming to india which treated defeated women and children as their harem and slaves.