It comes down to MLB roster rules, specifically that the 40-man roster is where your major league squad can come from. If you want to promote someone else, you first need to drop someone from the 40, and that means every other team has the choice to grab who you drop.
Prospects, after being in the organization for a certain (arcane and varying) number of years, must either be protected by being placed on the 40-man, or else be exposed to a draft for other teams to choose from. Thus, you will have some guys on the 40 who aren't quite ready, but at times you have to press them into major league service anyway, or else have to make a tough decision on whom to lose. Celestino and especially Lewis are prized prospects and in need of roster protection, so they become higher on the pecking order when a replacement player is needed, and are prime examples of what you asked about. Jorge Polanco was in a similar situation a few seasons ago, on the 40-man well before he was considered ready, but up he came a few times for emergency duty anyway.
Almost all the "why him when this other guy was doing better at AAA" questions get answered by looking at the situation this way.
I should try to find a good history of the 40-man roster, because my sense is that the current rules that define it have become outdated relative to the way major league teams manage their rosters.
/ edit - not that you asked, but I did locate the following article, apparently vetted by a SABR member so I give it some credence, which states that the 40-man limit in slightly different form was in place by 1910. The motivations for exactly what the limit should be surely have changed over the years, so I'll stick with my contention that the concept is outdated and ought to be rethought. https://www.baseball-almanac.com/articles/baseball_rosters.shtml