We should be aiming to make the switching process as painless as possible. We should always assume the the user *doesn't* want to discard their changes, so we usually use these warning boxes when they are accidentally about to lose some work. In fact, this dialog only exists because originally switching editor did result in lost work. Anyone who wants to deliberately discards their work can do so the way they would in any other context: by reloading the page.
As suggested by @Pginer-WMF in slide #4 http://imgur.com/a/9eC4t