I believe simply agreeing is a good response to a complement when an expression of gratitude is awkward. I agree with Rodney's "'I know,' or maybe 'Yeah, I lucked out,'" to respond to the complement you mentioned.
As to why I complement, it's to make someone happy or let them know they made me happy. I agree with angel146 on motivation.
Man, this agreeing shit can really get out of hand.