The feature has two functions. The first is to decrease the severity of the consequences if a conversation partner's device falls into the wrong hands, say a government who wants to use chat messages as evidence, a corporate competitor who stole the phone, or just a friend who is rifling through your unlocked phone.
The other purpose is to make it easier to participate in a social contract where your chat history won't be kept around forever for all participants to dig up in the future. Yes, someone could modify the client code, or take screenshots, or do any number of things to preserve data. You still have to take care about what you send. But most people won't, because it is additional effort and generally people want to adhere to social contracts.
Security is never all or nothing. It is always about taking as many reasonable steps as you can to limit your risks.