Before their invention, detonation had to be induced either by direct contact, time since launch, or height. All of these have significant disadvantages. Getting direct contact with a relatively small moving target is hard (even ignoring the effect of wind); to set a time- or height-triggered fuse one must measure the height of the target (or even predict the height of the target at the time one will be able to get a missile in its neighbourhood).
With a proximity fuse, all one has to worry about is getting a shell or missile on a trajectory that, at some time, will pass close by the target (that still is a significant problem).
External link