GavestonPS said: "1. It is not at all uncommon for a show to be sold out for s few performances each week (weekend nights, say) and still be losing money on the week as a whole.
Absolutely true. And a sold-out show doesn't necessarily mean that those tickets were paid for, let alone paid for at full price.
2. Many if not most contracts with theaters give the theater the right to evict a show once it falls below a certain weekly gross, whether or not the lower gross is meeting the expenses of the producers. As Call_me_jorge points out above, the theater may have evicted MATILDA with the expectation that something more profitable would replace it.
The Great Comet of 1812 unexpectedly decided to go for an open run at the Imperial, which was slotted for Hello, Dolly! Matilda had a really bad winter last year, so the Shubert was offered as an alternative option to Bette Midler. She said yes.
In theory, MATILDA could move to another theater, but that is expensive and, with theaters in short supply, the producers of MATILDA may not have found another theater where they thought the show would do as well.
They struggled last winter, and with such a large cast, they probably rarely earned back their running costs each week during that time, so they would unlikely be any more successful at a smaller house with the same running costs.
IOW, lots of variables govern the closing of a show. It's not quite as simple as "the show isn't making money", even though that's what we usually say here. The expectation of future revenues may be more important than the actual revenues of the present."
I believe that's what happened with Mamma Mia! They could still be profitable in a smaller house, which is why they transferred. Unfortunately, much of its audience was a result of "impulse" buying based on its marquee visibility, which it lost on 44th Street. I'm sure its several-month closure for the transfer also contributed.