What money can you make from such a map editor?
Prolonging the lifetime of a game is great for the customer, but for the studio? Blizzard had to keep the original Battle.Net servers online much longer, and with much greater capacity. That costs money. at the same time, sales of new copies of the game are almost non-existent.
Users expect patches for new OS versions, compatibility with new hardware etc. The more lifetime your game has and the more users, the higher the demand will be and the higher the backlash for not doing so.
So, you drastically increase maintenance costs without getting much in return.
Moreover, microtransactions and DLC are becoming increasingly popular. A map editor eats away at that lucrative market.
Finally, making a releasable map editor is a tremendous amount of work. Having a buggy, hard-to-use map editor for in-house production is something you might be able to live with. But releasing it to non-technical customers? That's a recipe for disaster. When making such an editor, you have the initial cost of polishing it enough to actually release it, and then have to maintain and support it. You are basically building two products at the same time.
You have to undertake quite some financial efforts to make that possible, for a questionable gain. It's a simple business decision, does having an editor and custom maps drives sales of your game really enough to justify the costs of providing the editor? In the modern gaming industry, the question is increasingly "no".
Furthermore, companies are reluctant to play the long game. take AoE 2 for example, as said in a comment by inappropriateCode:
Consider Age of Empires 2. The scenario editor created a community of mappers and modders, and part of them went on to create the unofficial expansion: The Forgotten Empires. That was successful, and the product owners decided given AoE2's lingering popularity, there was money in reviving it with Age of Empires 2 HD, and subsequent expansions. It's the most popular paid RTS on Steam by a mile, with over 4 million owners last I checked. Sure the developers at the time didn't benefit from that, but the product owner certainly did later. Producers/developers?
While this is true, its a risk. At release time, you cannot foresee the future. You can either have lower costs and thus more profits now, or gamble on some sales 10 years in the future that may or may not happen at all. Its a huge risk, and AoE2 is one of the extremely few examples where this did work out that way. Since companies are usually risk-averse, this is not a strategy that would deliberately be chosen.
While WC3 and AoE are good examples for games where it worked, Settlers V, which included a very powerful map editor with its own scripting language, receved very mixed critics and is generally considered a failure, despite being part of a very popular and strong series of games (granted, they probably peaked at Settlers II/III and then went downhill) and having such an editor.