The purpose of using OTPs is to enhance the security of the user's account by requiring them to verify their ownership of the phone number before granting access or account creation. This helps protect against unauthorized access and reduces the risk of fraudulent activities related to the user's account.