Adult and child actors alike are frequently replaced for a long list of reasons (many that have nothing to do with performance or talent). Most are replaced during those long hard out-of-town tryouts where they do all the work to create a role and create a new show (the hardest job in show business with long rehearsals on top of 8 shows a week and new scripts, songs, and staging going in and out almost daily). We even have one close friend who did 10 days as a lead on Broadway and was at that point replaced. Seems most replacements come when there is a change in the creative team or if the character takes on major rewrites.
Joanna is certainly not alone in being a child who was given a Broadway contract and later replaced and given a severance or "buy-out" package before opening. Her situation was unique as it was publicized by Macys (kinda like the current reality shows). But most of us with working kids are smart enough to not talk or have articles written before the opening night. At least it makes it easier if cast changes are made. As far as all those talk shows with her crying and saying "I'm not Annie no more." I can't imagine a parent willing to do that to their child. It is very painful for an actor to walk away from a show and the cast continue without them. Most smart working families just take their severance and head out to the next audition. We immediately went on vacation for a fun distraction and re-entry into real life. But this kind of replacement happens regularly. (And it's a rare producer or director who gives the news face to face to a kid -- it typically comes from their agent).