They only stuck by him when he was still the best option. The only alternative was to splash the cash on a new 'keeper and say he was an £18m failure.
IMO, he'd be mad to sign a contract out of some fairly silly idea of loyalty. Yes, loyalty is important to an extent, but we're not talking about small figures - I'd say loyalty in terms of not flirting with an exit/not letting his standards drop to force a move/etc is important... taking a massive personal financial hit, not so much.
Say he signs a contract and then Real have to pay £50m, that weakens his negotiating position with Real significantly. For example, he could sign a five year deal with Real, he'd already be costing them £10m/year in terms of FFP/in accounting terms, then throw £150k/week on top of that and he's costing them another £7.5m/year... so £17.5m/year in total. Instead, consider him signing on a Bosman and he could ask for £200k/week and still cost them significantly less per year in accounting/FFP terms (£10m/year, instead of £17.5m/year).
Real could get him for five years and it cost them a TOTAL of £50m, with De Gea getting £50m of that. Or he could sign a deal with Manyoo to benefit them, with Real getting him for five years and it costing them a TOTAL of £87.5m, with De Gea getting £37.5m of that. (That's ignoring any hypothetical cut of a transfer fee going to the player, of course... but even if De Gea got the hypothetical earnings shortfall corrected by that, the additional cost to Real could put the move at risk... would De Gea take that risk, if it is the dream move?)
First I'd just point out to everyone that Utd never had to stand by him, he was a top keeper straight off, he had dodgy games, every keeper does. He was never at all shocking and yes the media were all over his back because the media and fans are by and large useless. He was a very good keeper when he joined, he's improved, it was drastically exaggerated how bad his realistically few particularly bad games were.
Second, you're discounting two major things in regards to what money De Gea can get. Firstly he can use walking out on a bosman to join Real as a negotiating point to get that 200k a week out of Utd to begin with, then when Real came a knocking, he could use his existing 200k a week to negotiate for an even higher wage from them. Thus he could get 200k a week(instead of whatever he is on) for the year or more till he can actually sign for Real then get even more when he signs for Real... win win basically.
Player has all the power, the other thing you're discounting in regards to a move to real is star power, statement making.
Bale wasn't on a massive amount at Spurs yet signed for a monumental deal dwarfing most other players even at Real... why, big money deal. When Real/Barca go and make a big deal, it's a bigggg deal, they make it a big deal, they throw big wages and make a huge press hoohaa and work out deals with sponsors for bonuses and the like.
After a certain point a transfer becomes so high profile that clubs want to be seen as not just spending crazy but make it appear like they are getting the best player in the world in that position and will give out wages appropriately. So a £50mil transfer for a keeper wouldn't likely reduce the wage.
Smaller scale deals at clubs not spending just to make a statement(which is basically everyone outside of Bayern, Real, Barca and to a lesser degree a few of the top english clubs) might have this wages vs transfer issue where a bosman becomes a useful tool for getting better wages.
Taking the Chamakh deal, he wasn't a huge name, he was a budget signing as back up(at best) meaning total value of the deal was important to us and he got a huge raise on a free transfer rather than coming 6-12 months earlier on lower wages. It both helped that his existing club and Arsenal didn't regard him as irreplaceable or almost one of a kind nor did they have the money to offer Chamakh to get him to stay should he actually be that good.
But we're talking about deals where value is of paramount importance. With Real/Barca value isn't top of the list in factors when considering a deal like this, making a statement, intimidation, getting a one of a kind(supposedly) player, telling everyone you can't match them financially, no one else can spend £80mil AND make a profit still.
In this situation as above De Gea is at a club that can afford huge wages, he's one of the best in the world in his position, only a couple of clubs could afford those types of wages and the only bigger clubs he could move to would happily make a 'statement' transfer with high wages to go along with it. He has little to lose in signing a contract because he can get those huge wages now, then if he wants to force his way out, he can and Utd would get a decent value for him... then Utd, De Gea and Real get what they want. Could Real spend less and still get him, sure... do they need to, no, is value for money what they are looking for, nope.