I used to lie all the time when I was little, why? Because I was getting in trouble a lot (I was just 'that kid' that was always doing the wrong thing), and I was attempting to get out of trouble by saying what people wanted to hear. Did it work? Sometimes, other times, not at all.
Also, I'd lie and take the blame for something so that another wouldn't take the blame. Because I was trying to be a good person, I guess.
I also occasionally lie nowadays, to keep a secret, or (in rare cases) to avoid hurting someone, or to seriously damage my own friendship with someone who I really care about.. although, I do prefer to give people the 'harsh' truth, rather than a lie.