Basically, the company had to pay for its own buyout when private equity firms KKL, Vornado, and Bain bought the company for $6.6 billion, mostly with loans.
Because the company then had to pay off those extreme loans, they were forced to sell off their assets and property, which they leased back from the very private equity firms that now owned them.
The same thing happened more recently with Red Lobster and JoAnn Fabrics.
Companies are valued by earnings-per-share, independent of the assets. So if the P/E ratio is too low the company costs less than its assets and it pays off to sell the parts.
https://en.m.wikipedia.org/wiki/Price–earnings_ratio
In this case I heard a rumor that Amazon did it to dominate the toy market, so losses could have been acceptable.
I certainly would not put it past them.