She might want to manipulate Elena. Katherine is known for her devious ways, and by sharing her story, she could be trying to gain Elena's trust or sympathy for her own purposes.
It could be a form of warning. Katherine has a lot of experience in the vampire world, and she may see some similarities between her past and what Elena is currently going through. So, she tells her story to warn Elena about the potential dangers or mistakes she could make. For instance, if Elena is getting involved with certain vampire groups, Katherine's story could be a cautionary tale about the consequences of such associations.