The child may have never even visited country A, may not even speak the language or not very well, may know little of the culture of country A. Meanwhile they will have been educated for 18 years or so in country B. Country B will have invested a great deal of both money and social capital in raising this child who, not being a citizen won't be able to fully participate and bring that value back to country B. If they end up deported back to country A, they're not a great resource there either. With no experience of the culture and possibly a weaker grasp of even the language, they may not be a very useful resource there.
From the perspective of the individual, their experience, actions and potential may be no different from the millions of citizens, but because of their parents, they would be on shaky ground in the place they have always known as home.
This may be less of an issue if the country B in this scenario offers a road to citizenship for these people who've lived their whole lives there. Even something more halfassed like DACA mitigates the harm to an extent. But given the fickleness of changing regimes, a lack of citizenship puts a resident into a difficult place.