I think that in an ideal society, everyone would follow their own moral values and laws wouldn’t even be needed.
Morals don't come ex nihilo. People develop them from social interactions and survival patterns, typically at a young age. The broad purpose of law is to set a publicly recognized boundary for universal conduct. It isn't to simply be mean to people, but to publicly declare what a community of people values as socially valuable.
in reality, very few actually have internal moral values.
People largely have a certain internal sense of social justice. But they have a limited capacity to engage with their neighbors from any kind of authority position. The internal morality can get twisted when you constantly see yourself as a victim and feel the urge to right some existential wrong. Portraying one group as a victim and another as an aggressor is a classic propaganda technique used to inflame hostility between neighbors and socially justify violence.
The solution is of course education
At some level, sure. But it is difficult to inoculate a public at-large from all forms of deceptive media.
At another level, the solution needs to be establishing a general level of public contentedness and satisfaction. Agitation is less effective in a social circle that isn't under high degrees of anxiety or fearful of deprivation. So long as we have the threat of poverty and stochastic violence hanging over people's heads, we're going to have the material for propaganda that agitate them into tension with their neighbors.