While the question could be marked as duplicate of Through what process does MESSENGER undergo orbital decay?, there's some hesitation to do that so I'll post an answer and also link to @DavidHammen's answer.
edit: and now also link to @DavidHammen's other answer!
MESSENGER was not specifically sent crashing into Mercury by direction of NASA, in fact they delayed this by boosting it to a higher orbit. But NASA knew that by putting it into a low orbit around Mercury in the first place (low in order to observe Mercury, the whole point of the mission), MESSENGER was destined to crash.
This is because the spacecraft was orbiting around a very low mass body, very close to a very large mass body (the Sun), and the Sun's tugging on MESSENGER's orbit increased its eccentricity until it intersected the planet's surface.
From the April 2015 SpaceRef article MESSENGER's Operations at Mercury Extended:
MESSENGER mission controllers conducted a maneuver yesterday to raise the spacecraft's minimum altitude sufficiently to extend orbital operations and further delay the probe's inevitable impact onto Mercury's surface.
The previous maneuver, completed on March 18, raised MESSENGER to an altitude at closest approach from 11.6 kilometers (7.2 miles) to 34.4 kilometers (21.4 miles) above the planet's surface. Because of progressive changes to the orbit over time in response to the gravitational pull of the Sun, the spacecraft's minimum altitude (periapsis) continued to decrease.
At the time of yesterday's maneuver, MESSENGER was in an orbit with a closest approach of 5.5 kilometers (3.4 miles) above the surface of Mercury. With a velocity change of 2.96 meters per second (6.63 miles per hour), four of the spacecraft's 12 smallest monopropellant thrusters nudged the spacecraft to an orbit with a closest approach altitude of 27.5 kilometers (17.1 miles). This maneuver also increased the spacecraft's speed relative to Mercury at the maximum distance from Mercury, adding about 1.2 minutes to the spacecraft's eight-hour, 17.6-minute orbit period.
Yes, that's that's only 5.5 kilometers above the surface of Mercury!!
So even a very weak tug by the Sun via the Kozai mechanism will result in a quick demise, and the three mission extensions only served to delay the inevitable.
Notice the nice timing by the way, Messenger crashed soon after the end of the 2nd mission extension.
Dates from Wikipedia (mostly)
Flyby of Earth (gravity assist) 02-Aug-2005 2,347 km
Flyby of Venus (gravity assist) 24-Oct-2006 2,990 km
Flyby of Venus (gravity assist) 05-Jun-2007 337 km
Flyby of Mercury 14-jan-2008 200 km
Flyby of Mercury 06-Oct-2008 200 km
Flyby of Mercury 29-Sep-2009 228 km
Mercury Orbital insertion 18-Mar-2011, 1 year mission
mission extension 1 year 17-Mar-2012
mission extension 2 years 17-Mar-2013
below: from here