I recently bought a bike rack from a well-trusted store to fit onto my schwinn circuit bike. Just today, however, I had accidentally bent the bike rack. It wasn't horribly disfigured but it was lopsided to the right to the point that its left stand was pushing up against the rear wheel. I took it to a local shop and the person there, who did manage to reposition the rack to its normal place, recommended I buy a new one, saying it is practically dead. Therefore, I headed to the bike shop where I actually bought the rack and explained the situation. Upon their own inspection, however, they told me everything seemed okay and that as long as no part of the accessory was actually broken and only bent, then it wouldn't be necessary to buy a new one. I myself don't see any faults with bike rack, although I am somewhat of a novice when it comes to the biking scene and have no knowledge of repairing bikes. Should I keep the bike rack and save the money or should I buy a new one?
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.
Without more details, your question can't really be answered.
However, as others have pointed out, metal that is bent and unbent does become weaker – this is known as work-hardening and it's the reason that pieces of metal or plastic break if you repeatedly bend them back and forth. However, your rack was made in the first place by bending pieces of metal, so there's no reason to assume that bending and unbending once would be fatal.
Your rack is probably weaker than it was before. Most racks seem to be designed to carry 20–25kg (45–55lbs), which is certainly a lot more than I carry on mine. If you only use your rack to carry weights well below its design limit, you'll probably be fine; if you use it for carrying heavy loads or medium loads on rough terrain, it would be safest to replace it.