This kind of self deprecation is closely related to the inability to take a compliment. There is a scene in "Mean Girls" that is incredibly poignant (yes, I said that) where the main mean girl tells the new girl she is very pretty. The new girl accepts the compliment and says "thanks!" which prompts the mean girl to reply, "So you agree, you think you're really pretty?" It's so hard to take a compliment without sounding vain, and hard to deflect one without sounding insecure. When we deflect compliments, is that our way of conveying that we think so low of ourselves that we find it hard to believe anyone could have something nice to say?
I hate standing out or being noticed. I work as a chemical engineer and am the only female programmer in my company. I try to dress plainly so as not to draw attention to myself, I follow up my ideas with "or something" so as not to seem too bold, I bring up my own flaws so I can be sure people don't think I think I'm something special. Whether I am or not, when in a room with men used to working with men, it's best not to show them up ever. This might be anti-feminist of me, I'm not sure, but I also think it's a smart career move, and I don't think many women make it into upper management by being as aggressive as their male counterparts.
This past Christmas I was invited to a luncheon my company was hosting for a pharmaceutical company we work very closely with. I had only been working here for 6 months at this point, and no other young engineers were invited so I was very excited about going. Upon arrival, I drank a quick vodka club (SOCIAL LUBRICANT!) and made a stupid joke to a guy I had worked with before about him being shorter than me (I am 5'10" and was wearing 4" heels, so really most people there were). Self deprecation mode kicking in, I turned the joke around on me and pointed out how enormous I am etc etc. He chatted with me throughout the whole lunch and told me I am very "endearing". Did my joke, akin to the jokes I hear my male colleagues making with each other all the time, endear me to him or was I endearing despite the snarky comment? Did I get called a "bitch" later on behind my back, or did people appreciate my wit and ball-busting? I want people to like me but I also want them to know I am competent, and I think, in the burgeoning male-dominated industries, this is the new "can women have it all?" struggle.