Despite the similarity, I've never thought of these as meaning the same thing because their usage is so different:
わざわざ
means that someone has gone out of their way to do something.
せっかく
means that someone has made an effort, or some unexpected opportunity has come up, and it would be a shame to waste it. Mostly it is used positively in the sense of grasping the opportunity, but sometimes it is used in turning down the effort.
This is explained well in the 類語例解辞典 entry for せっかく/わざわざ:
【1】「せっかく」は、「せっかく…のに」「せっかく…だから」「せっかくの…」などという言い方で、努力してそのことをしたのだから、それが無駄にならないようにという気持ちを表わす。また「せっかくの…だが」「せっかくではあるが」などの形で、相手の頼み、申し出などを断る場合に使う。他に、「せっかくの休みに雨が降る」など、たまにしかない機会が無駄になる事態を惜しむ気持ちを表わすこともある。「折角」とも当てる。
【2】「わざわざ」は、あえてそうしなければならない必然性はないが、何かのついでではなく、その事だけのためにするさまをいう。特に、相手に気を使って、あるいは心を尽くして、相手のために何かをする場合に用いられることが多い。また、しなくてもいいのに、あえてするような場合にも使う。
Sekkaku is used in the expressions sekkaku... no ni, sekkaku ... dakara, sekkaku no..., and expresses a feeling that since an effort has been made to do something, it should not be wasted. In the form sekkaku no ... da ga or sekkaku de wa aru ga, it is used to refuse the other person's request or proposal. Also, in expressions like sekkaku no yasumi ni ame ga furu ('just when we had a holiday it rained') it expresses regret at a situation where a rare opportunity is wasted. Also written 折角.
Wazawaza describes a situation where, although there was no necessity to go to the trouble, a person has specially gone out of their way to do something, and not merely in passing. In particular, it is often used where something is done for another person out of concern or care for that person. It is also used in cases where someone is going out of their way to do something that they don't need to.
(Please forgive the clunky translation. The explanations are full of Japanese terms that don't go easily or directly into English).
In 1) the emphasis is on appreciation of an effort or opportunity and regret at the possibility that it will be wasted. In 2), the emphasis is on the fact that someone has gone out of their way to do something, usually (but not always) with appreciation of that action.
It is interesting that you've managed to come up with two examples where わざわざ
and せっかく
are similar in meaning and usage!
わざわざ来てくれたからご飯をおごるよ
and せっかく来てくれたからご飯をおごるよ
differ only in that the first is a 'reward' to the other person for making a special trip; the second is a decision to take advantage of (i.e., not waste) the effort that has been made.
わざわざ美容院に行ったのに、雨で髪がくしゃくしゃになっちゃった
and せっかく美容院に行ったのに、雨で髪がくしゃくしゃになっちゃった
are very similar. The first suggests that a lot of effort was made but the result turned out no good. The second suggests that a lot of effort was made and it was a shame that it was wasted. (It might be slightly more natural to say for the second one: せっかく美容院に行ったのに、閉まっていた
.) In most cases, however, the usages are quite different.
Examples from the same dictionary:
〔せっかく〕(副)▽せっかくの好意を無にする▽せっかく来たのに留守だった▽せっかくですがお断りします
〔わざわざ〕(副)▽わざわざ持って来てくれた▽わざわざ来るには及ばない
Sekkaku: (adv) sekkaku no kōi o mu ni suru 'to bring to naught goodwill that is not come by every day' or 'to bring to naught goodwill that one should be grateful for' ('sekkaku' is not easy to translate here -- it doesn't mean 'goodwill that someone has gone out of their way to present'; it expresses regret at a wasted opportunity), sekkaku kita no ni rusu datta 'Even though I made a special trip (to see you) you were out', sekkaku desu ga o-kotowari-shimasu 'I appreciate your making this request/proposal, but I regret that I have to turn it down'.
Wazawaza: (adv) wazawaza motte kite kureta '(he/you) specially brought it (to me/us)', wazawaza kuru ni wa oyobanai 'there's no need to make a special trip / go out of your way to come by'.
In these sentences there is very little overlap in possible usage.