I agree with orangehonda it's just a social gesture and out of respect like football/rugby coaches shaking hands etc. A few times my opponent will wish my good luck and then add that he hopes i lose.
Why "Good Luck" wishes?

Blimey!, I think I will just start with a "smilie" and hope to avoid upsetting anyone
I hate the smiley face, I would find that very upsetting.

I had encountered an opponent who wished me "good luck" at the start of a game on live chess. My reply to him was, "Luck has nothing to do in Chess. I would prefer wishing "Good knowledge, good skill, good positional tactics, and good timing".

I had encountered an opponent who wished me "good luck" at the start of a game on live chess. My reply to him was, "Luck has nothing to do in Chess. I would prefer wishing "Good knowledge, good skill, good positional tactics, and good timing".
And with the time it took to type your reply, your opponent luckily found himself with 2 minutes to your 1
Can't anyone come up with anything really offensive to say ?
"good luck, you'll need it ;)"