Safety stock is a buffer against unanticipated changes in demand or supply chain interruptions. It guarantees that e-commerce firms have enough stock to avoid stockouts and keep customers happy during unanticipated events.