In the case of FogBugz, the muck is the problem they decided to create for themselves (lots of targets to run on) that justifies solving the non-core business problem (creating Wasabi[1]). Or does it? [2] That kind of thing runs contrary to what I usually recommend and see recommended. It would be interesting to get a recent Spolsky take on it.
Supporting (Windows|Mac|Linux) on (MySql|MS SQL|Access) was a small but meaningful portion of our revenue stream for over a decade.
Having our own compiler meant we could migrate easily to a new platform (.NET/Mono, in our case) with two engineers working full time for only a few months. Should we have spent that time rewriting the app in C# by hand instead? How would we ship new code in the meantime?
[1] https://www.joelonsoftware.com/2006/09/01/wasabi/
[2] https://jacob.jkrall.net/killing-off-wasabi-part-1