The job of teaching a child morality was deemed to belong to family and church.
And when they don't, then what?
Regardless, you're completely mistaken that values weren't taught in school. Values have
always been taught in schools. The high school that I went to had "teach me goodness" as part of their latin motto. Is that not values?
And as far as divorcing religion and families from schools, are you under some illusion that families and churches weren't intimately involved with the running of schools, even moreso than they are today even?
Kids don't
just learn values at home and never have. They spend more time in school than anywhere else. Consequently, they learn far more about social values from their interactions at school than anywhere else. I don't know what makes you think that values were never taught in school. If you're so certain that the method of teaching values in schools has changed dramatically, perhaps you might want to give empirical evidence as the drastic changes that have taken place.
In fact, I would go so far as to say indoctrination is far less today than it ever was because socially we're moving towards greater plurality in society. As a result, children aren't being indoctrinated into any particular value, as they would have been in the past (e.g., Catholic values in Catholic schools and Protestant values in public schools). They're learning to be open and accepting to people of different backgrounds because that's a basic requirement to function within a social melieu that is increasingly pluralized over time.