From the point of view of the user interface, not including the cancel button, problems may arise with some users, since they have no choice, which is certainly not the case. Imagine the following simple decision scenario:
Note: all files in the selected folder will be deleted. This action cannot be undone. Are you sure you want to continue?
How stupid would the interface be if the only option was Ok? In addition, as noted above, on many platforms, the Escape key is displayed on Cancel. It is also probably worth setting the default button so that pressing the Enter / Space key does not perform an unintended action that cannot be undone.
Krsna source share