Maybe because the missile miss the target? Why would a missile need to detonate around a target if it can just physically knock off the target.
It depends on the interception scheme or schemes.
The more complex the interception schemes designed into the missile, the greater the uncertainty of a miss and therefore the greater the need for proximity explosive device.
In practice, even the most simple interception scheme -- tail chase -- have high uncertainty due to the potential maneuverability of the target. That maneuverability does not have to be innate, like built-in like a fighter aircraft would be. A gust of wind could make the target deviate from its flight path and to the missile, there is no way for it to know if that deviation is intentional or accidental.
Tail chase interception is the most simple but it require the launcher to place the interceptor in the initial ideal situation, meaning the launcher must wait until the target has passed his position before he can launch his interceptor. This is not always ideal in combat, especially aerial combat where the target is designed to be maneuverable and the executions of those maneuvers are unpredictable. So even though every pilot prefers to be behind his target and usually tries to position himself thus, he cannot take flight with the attitude that he will
ONLY fire from the tail chase position. Not even WW I and WW II era fighter pilots have such limited combat view. They will engage head on, from the sides, oblique, top, and below.
The head-on interception scheme is problematic in that if there is a miss, it is extremely difficult of re-acquisition by the interceptor, human or missile. If there is a miss, sensor loss of target line-of-sight (LOS) is immediate. That sensor could be visual and/or electronic.
Why did I point out the tail chase and the head-on, the two most simple intercept structures?
Because of something call 'navigation intercept laws'...
Development of guidance laws for accelerating missile - Springer
Abstract
The most widely-used guidance law for short range homing missiles is Proportional Navigation (Pro. Nav.). In Pro. Nav. the acceleration command is proportional to the line of sight angular velocity (L.O.S rate). Indeed, if a missile and a target move on collision course with constant speeds the L.O.S rate is zero.
The speed of a highly maneuverable modern missile varies cnsiderably during flight. The performance using Pro. Nav. is far from being satisfactory.
In this work we analyze the collision course for a variable speed missile and define a guidance law that turns the heading of the missile towards a collision course. We develop guidance laws based on optimal control and differential games, and note that the optimal laws coincide with the Guidance to Collision law at the moment of impact.
The tail chase laws are 'pure pursuit' laws, the simplest set of navigation/guidance laws.
Head-on interception scheme uses the much more complex proportional navigation laws...
IEEE Xplore - A derivation of pure proportional navigation
There are two basic proportional navigation guidance laws in missile guidance: true proportional navigation (TPN), and pure proportional navigation (PPN). The missile command acceleration in TPN is defined to be perpendicular to the line-of-sight (LOS), and is proportional to the LOS rate and the closing velocity. While in PPN, the missile command acceleration is perpendicular to the missile speed vector, and is proportional to the LOS rate and the missile velocity. This paper presents a derivation of PPN, which is performed via Q-parametrization of stabilizing controllers to optimize the robust stability of the parameter-frozen system.
As the missile uses sensor responses, be it IR or radar, extremely complex combinations of laws, hybrids or true, are constantly in play. The more sophisticated the sensor or package of sensors, the more complex the laws.
All of this is because of the desire to engage the target
FROM ALL DIRECTIONS. If the missile was launched from the tail chase position, its initial use is pure pursuit (PP), for example. If the target maneuvers and if the target is still in sensor LOS, depending on the offset angle between the missile's heading and the target's heading, once that angle breaches a threshold, the missile switches to pro-nav or complex hybrids of it, kicks in its fins, and continues after the target.
Precisely because of the unpredictability of the target to execute maneuvers, proximity fused explosives are necessary. Complex sensors and guidance/navigation laws do not guarantee interceptions. That is why there is that thing called 'probability of kill' or Pk.
The greater the need to have an all aspect engagement interceptor, the greater the need for proximity fused explosives. The goal is not the destroy the target, even though that would be a nice thing to achieve. Rather, the real goal is to damage the target severely enough to prevent it from accomplishing its mission, which is to do damages to whatever that is valuable to you. If the target maneuvers just right so that you can literally hit it -- great. But we know that there are many gods of war and they are a fickle lot no matter how much we prayed to our own version, so the least we could do is to explode and do some damages if we cannot be sure of a physical collision.