It "works" (in that it doesn't cause problems like rationing by other means like queueing, under the table payments, subletting, or any one of the myriad other problems rent control produces) because it actually does nothing - it results in rents which are equal to what the open market price would have been.
Ultimately, if you want to reduce rents AND have a functioning market, you have two options (or a combination of them): (1) reduce demand, (2) increase supply.
Ultimately, if you want to reduce rents AND have a functioning market, you have two options (or a combination of them): (1) reduce demand, (2) increase supply.