I follow exactly what you are saying, 9MMARE.
Like it or not for some people, a gun is also a deterrent. The sight, the sound just may be enough to stop unwanted action. I know of one case personally where this was the case. Since the OP didn't specifically layout the exact scenario, I think it is entirely possible that there might be an instance where a "warning" shot will get you your desired effect. It's up to the individual to decide when and where. Certainly not if they thought their life was in immediate danger.