I often get confused if an accidental click on some link removes some data I need on a particular resource. I do not understand why the site webmaster is not able to add just one line that might allow to avoid many bad situations when some data is lost irretrievably.

There are many ways to ask for confirmation: it can be done either on server side, or on the client side. It’s almost a 5-seconds task with just one javascript sentence:

<a href="delete_something.php" onclick="javascript: if (!window.confirm('Are you sure')) return false;">Delete</a>

Of course, the server-side validation is not so quick and easy (yet it’s not a complex task), but it is more reliable. Ask users for confirmation if their action is going to remove some object or data. That’s essential I believe.