Communism/Socialism, was part of the constitution on most of the eastern European countries, and it didn't make it right.
People rose against, somewhere peacefully and somewhere violently, it and it is not anymore. Those countries are much better off now.
Constitutions often can be unjust, at time to time they get thrown away/re-rwitten.