In the context of messengers, people often choose to enable disappearing messages.
[...] While Signal and WhatsApp’s end-to-end encryption stops anyone intercepting your messages from accessing their content, it can’t protect your message data if your device or the person you are talking to is compromised.
“Even if data is encrypted and protected by a code, keeping messaging information available on your smartphone poses far more of a threat than not having it anywhere at all,” says Jake Moore, cybersecurity specialist at ESET. “Disappearing messages add a layer of security and assurance that the data is safe, because it no longer exists.”
https://www.wired.co.uk/article/whatsapp-signal-disappearing-messages
Some may choose to apply a similar reasoning to keylogging history via keyboard app. "The keylogging data is safe, because it does not exist."