Yes the world is unpredictable, which is why smart parents realise that they have to make the effort to teach their children to deal with unpredictability.
so they teach them :
to accept that things won’t always go the way they want,
that sometimes they need to adjust their ideas and plans to accommodate others
that they won’t always succeed at something that others manage to do easily but that hard work and application can help to bridge the gap
that not all people are nice, but you still need to learn how to deal with them
that you need to learn to get along with many different sorts of people, with different mindsets and values, not just dismiss them
that you need to understand how to keep yourself safe, know when to leave a situation and how to do so safely
These are really hard lessons to teach in isolation, you need to have contact with other people, to have real life situations and predicaments to learn how to deal with situations outside the family. It takes many years to grow a confident child, with good social skills, who is able to respond to new situations by having a mental back catalogue of previous situations and their outcomes to refer to.
A child in school is learning these and many other social skills as well as academic work, they are encountering other mindsets daily, they are developing their own emotional strengths and resilience. It’s like teaching them how to cross a road safely, they need to learn how where and when to cross real roads, and also which roads you never try to cross.