Fasting in Hinduism is considered as a way to please GOD.
As you mentioned about the Karva Chauth, on this day married women fast for longer life of their husband. Many may consider as a myth, but there is a long story before it which is even read on this day in front of GOD. Also, there is a story behind every fast, festival celebrated in hinduism.