"But generally, applications that accept user input and cannot save it for some reason ask for confirmation to lose it, so users won't lose it accidentally."
You'd think they do, but they don't, at least not all of them. The problem isn't the properly designed webapps, it's the improperly designed ones. That's what you somehow don't understand/recognize.
Also, the problem with the redirect happens on a certain popular bulletin board software that works without Javascript (and therefore doesn't provide such a prompt in the first place).