"It was..given..to me, by your father, Thrain, for safekeeping. I was to be trusted with it. Keep it, it's yours", she did hesitate on the first part. She hated to lie, but it was worse to be truthful. She killed Thrain, and took it for her own as memorable trinket; this was what she told Gandalf when he rescued her from the dark enchantment. "If there is a key, there must be a door!", Fili pointed out as he looked at the map in the distance.