When people use sarcasm, they often do so as a way of expressing themselves in a humorous or ironic way. Sarcasm can be a way to convey a message without being too direct or confrontational, and it can be used to make light of a situation that might otherwise be difficult to deal with.
However, it's important to remember that sarcasm can also be hurtful or offensive if not used appropriately. It's important to consider your audience and the situation before using sarcasm, and to make sure that your intentions are clear. While sarcasm can be a way to express humor or affection, it's important to use it in a way that doesn't cause harm to others.