The home can be considered "boot camp" for how to live in the real world. Children learn what they live. Parents are responsible for instructing their children on how to behave and what the consequences are for their actions. If the children fail to understand what they are being taught, it is the moral responsibility of the parents to retrain them.
Raising a child is kind of like teaching them to ride a bike. You do everything you can to keep them safe and you try and teach them the right way, but at a certain point you have to just let go and hope they don't get hurt. It is impossible for any parent to force their child to always do the right thing. Children need to live their own lives and make their own mistakes.