We also have to consider one of Lennie's primary motivators - at some point he is going to be able to "tend them rabbits."
Lennie, while he is still sad about killing the puppy because he enjoyed it so much (like the mice he killed by "petting them too hard"), the typical reaction for his character is to worry about the fact he has done a bad thing, and that he'll get in trouble. It shows us, in stark terms, that Lennie's mental age of 8 or so leaves him a permanent innocent, unable to comprehend what society would consider a crime. He can only react to the threats and punishments of George and his immediate future.
In the novel Of Mice and Men by John Steinbeck, Lennie does not understand the concept of consequences or cause and effect, because of his learning challenges. We never get to know or find out what exact syndrome Lennie has, and anyhow this is a very complicated area. But it clear that whatever it affects his ability for "emotional intelligence" as well as "cognitive intelligence." While his brain intelligence may be slow, it seems that his emotional intelligence is even further behind. So, for example, when he "pets his puppy to death" he is sad, but does not foresee the consequence that it means he will lose its company compeletly. So he keeps it with him even though it no longer responds. This shows his character is not always culpable for his actions, no matter how bad.
In Steinbeck's "Of Mice and Men" the character of Lennie is so childlike that he does not understand anything beyond the tangible. As long as the puppy is still warm, he pets it, believing that it may just be asleep. Or, at least, something may happen that it will return to what it is. Death is much too metaphysical for the ingenuous mind of Lennie to comprehend; for him, there is no understanding of consequences past "I have done a bad thing."
As Lennie pets the poor, dead puppy, the reader gleans an insight into his nature. So, after the death of Curley's wife when Lennie runs and hides as instructed by George, his understanding of this action also ends there. And, it is because Lennie would not understand any punishment for having inadvertently murdered Curley's wife that George prevents his from going to prison by his desperate act of shooting Lennie. As in "To a Mouse" by Robert Burns, the poem from which the title of Steinbeck's novella is taken, "the best laid schemes of mice and men often go awry."
Lennie is a very sensitive character. He loves little animals. It is too bad, however, that he is too strong and too stupid to realize how dangerous he is to them.
After Lennie accidentally kills the puppy that he has been allowed to have at the ranch, he keeps it with him. He "takes care" of it and pets it and treats it more or less as if it were alive. He is very sad that it is dead.
This is typical of his character because he is sensitive and caring.
What everyone has answered is on the mark, but I would like to add that Lennie knows in some sense that what he did was wrong. He's not keeping it because he's sensitive - he's keeping the dead puppy hidden, because - like a child - he is avoiding the consequence of getting in trouble. He knows that he will be punished and his punishment is possibly, "no more soft things to pet, " especially having those rabbits on their dream farm.
Does Lennie understand what he has done? Well, as a child, he does to some extent. He did a "bad thing." However, he truly does not comprehend that he has taken a life away from a living entity. Since he has killed mice in the past, his punishment was a chastising and the dead mouse taken away. He is eventually given a new one.
When he kills the puppy, unconsciously, he believes he will get yelled at again and maybe, given a new one in the future.
It is typical of his character. He does not know his own strength nor the severity of his actions. It is unfortunate, because it leads to the death of Curly's wife.