I'm trying to put in flat terms, but fundamentally power matters. This is the base of democracy: give people the power to change things, there needs to be a fear that these people will exercise their power.
Changing hearts and minds is beautiful, but one reason is that it usually doesn't happen, I think very few people will ever just stop being racists for instance. They might stop saying racists things, and might care more to not go against social rules and laws, but changing their deep believes will not happen, or it will take decades, if not a lifetime.
And also people are way more influenced by their everyday environments than nice speeches. Having a nation that values diversity helps more to also embrace these ideals, than living in a racist dictatorship and fighting at every corner to keep your minority voices in your heart.
> It's a slow, painful process
The trap is to see it as a one way ratchet, when in reality it comes and go, and the groups with the most power can revert decades of progress in a snap of finger. Women lost abortion rights over a few weeks (the leading to that was also long and slow, but when it finally happens it doesn't take much). Foreign people lost the right to return to their US home within days when the ban happened last time.
Power matters.