Every platform is slightly different, but typically users can delete messages by holding down or right clicking on the message and selecting the ‘delete/remove/unsend’ option.
Someone may want to erase something inappropriate, mean, or rude that they sent to another person before they read it. There could be sensitive information (e.g. card details, address, bank account details) that they don’t want to be available anymore. They might also just want to tidy up their chat!
Whatever the reason, it’s important to note that most of these ‘delete for everyone’ options do not erase the action of sending a message – only the content of the message itself. It’s also impossible to ensure the recipient has not saved, downloaded, or taken a screenshot of the message before it was deleted, so the message may still exist on another device.