The lie does matter to them. The number one reason people lie when it just doesn't matter is because they actually do think it matters.
Dr. Paul Ekman explains why people lie. Read more about reasons for lying including avoiding punishment, harm, or embarrassment.
In fact, some people, sad to say, lie almost all the time. Psychologists call these people compulsive or psychopathic liars. They tell lies even when they don't.
There are several theories for why some people can't stop lying. Narcissists are often pathological liars, because they simply don't care about.
You are lied to dozens of times every day. They range from little white lies, such as people telling you they are doing great when in fact they are having a terrible.