This limitation is enforced by Facebook (parent company of WhatsApp) to improve the customer experience for WhatsApp users.
Session messages are free of cost to encourages businesses to respond in the shortest time possible.
Your API provider may charge a nominal per-message charge for session messages.
Template messages can be sent to customers after the 24-hour limit. But these messages need to be pre-approved by Facebook and have certain limitations on the type of message you can send as a template.