Should I buy a new bike rack if my current one has been bent?
Without entering too much in material science, when a metal is permanently deformed it is because it has worked out of its elastic region and has gone into its plastic region. 

This highly reduce the ability of that part to absorb energy, which is highly desirable in all the impacts.

Though somebody may have straightened it back, it can always happen that as soon as hit a bump or have a sudden load on your rack, it will bend again, with obvious consequences on your stability.