It is one of many defense mechanisms of the brain that is natural. We as humans are known to be naturally "pleasure seekers" in all respects of the phrase. So lying is simply a way of avoiding negative experiences, pain, etc. and aids in pursuing our ultimate goal of pleasure. This is Looking at humans on a very base and instinctual level of course. But the same idea is still applicable. Freudian theory would definitely be helpful to understand this question.