Definition by Dictionary.com
to abstain from an impulse to say or do something (often followed by from):
Synonyms: abstain, avoid
Instance without a verb: I refrain from alcohol.
Instance with a verb: The future generation will reap the best results of civilisation by refraining from repeating mistakes of the past.
^it would be grammatically wrong if repeat is omitted, even though in both context it still make sense and mean same thing
PS: I know what is wrong and right, but I am looking for the constructive explanation behind this.
Best Answer
To summarise the comments :
You refrain from doing something (a verb) in order to please someone else, whereas you abstain from an indulgent thing or activity (a noun or verb) because of a personal conviction that it is wrong or bad for you.
Language is formed by customary use, so the only explanation for this usage is "because that is the custom in this country."