I don't know of any case where a mainframe couldn't, in principle, be replaced by a server farm. However, maintaining a sufficiently reliable and secure server farm is a specialist job too so the benefits aren't always clear cut.
Ease of migration is really down to what the mainframe is doing and for how long. In practice, they tend to be in place for a number of years in hub-type roles e.g. general ledgers, payment systems. That sort of thing. The effect is that extricating them is extremely complex and expensive.
However, these issues aren't really limited to mainframes. We have the same problems with trying to extricate Sparc Solaris applications. We generally want to replace them with Lintel as we use them in most applications. But doing so is horribly complicated as they're embedded in byzantine flows that few understand and the systems often assume a level of hardware reliability that commodity boxes don't have.