Why have some cities and towns passed rent control laws?

Why have some cities and towns passed rent control laws?
How do these laws affect price equilibrium? What happens when these laws are repealed?