There are a lot of young people who don't live anywhere where they would regularly come into contact with people - agemates or grownups - not like themselves in some manner. If they were older and in the workforce, they might. But as children, they only run into other kids in their neighbourhood and school. Some are fortunate enough to live in very diverse places, but most will live somewhere that is maybe not deliberately segregated, but incidentally so, perhaps simply by virtue of housing costs or proximity/distance to services relevant to a minority group.
There's two aspects to that. One is simply gaining familiarity with, and a sense of normalcy about, how other groups live their daily lives. Another is the broader economic struggle that impose conditions on those daily lives that one may not be aware of unless you get exposed to it. I remember so well when my dad made a point of driving me through Kahnawake as a young teen, to show me what life was like for Mohawks in the region. It was dismaying to see the housing conditions at that time, given all the shiny tony Montreal suburbs we had to drive through to get there. The contrast in living conditions was pretty stark.
So, while such books for children may not necessarily expose them to the bigger issues (and it would be hard for a 7 year-old to appreciate them, anyway), it does a service by making people often depicted as "different" feel maybe not so different at all. At least not so different as to be strange and hard to understand.