There is a difference between alleging poor service or quality of accommodation, and, alleging a criminal act committed on the premises or by hotel staff. Trip Adviser likely must take down these posts because they allege criminal acts that in many cases are not proven in a court and therefore, Trip Adviser can be sued for libel by the hotel. If the crime is reported and charges are subsequently proven and the case is a matter of public record, then I'd say Trip Adviser is obligated to report that fact in some way. But that can take a long time, and I'd guess some guests don't report the crime to the local police at all.
It's a terrible situation not just that someone is victimized, but that they cannot warn others and spare them. What is the solution? How can victims ensure that future guests are warned?