Why? Desperation, foolishness, recklessness - take yer pick.
The logical choice would have been not to extend his contract given the nature of the situation. We had a first rate shot stopper who, going into his thirties now, had shown no signs of improving the areas of a goal keeper's game that will keep him in the "world class" bracket beyond a certain point (that is, beyond the point where his exceptional shot stopping ability outweighs his other deficiencies) - and we made him the best paid player in his position in the world (by far).
It's Woodward era decision making par excellence, what else can you say?
The bottom line is this: you don't pay a goal keeper Messi level wages (for his position) unless he's an extreme asset, someone who is undeniably the best in the game in pretty much every relevant sense. De Gea obviously isn't that.
Sure - he's become a target now, a space goat and all that, inevitable really. And an isolated feck-up (Everton) means nothing - any reasonable fan knows this. But Dave has not developed his game - he has multiple glaring weaknesses as a top level keeper: that isn't some sort of illusion promoted by agenda driven "haters", it's objectively true. Can he address these weaknesses? Anything's possible. Is it likely that he will? Oh, dunno about that.