While it is true that they can prevent people from entering, the downside of that is that they could also prevent the occupant of the home from being able to exit through a window, in case of a fire. One particularly bad case of this happening was in the Philippines, where on the sixth floor of a hotel a number of people became trapped and perished due to window bars preventing their escape.
Another factor is that if an intruder was already in the house after entering from another point other than a window, the occupant of the home would potentially become trapped with the intruder if they could not escape through a window.
What about when selling a home? Window bars could actually decrease the homes value as it could give a potential buyer the idea that the neighborhood is dangerous.
Even with all this in mind, though, the fact is that in some cases it is a good idea to leave them in the house. In such cases, the first floor and basement are generally the only floors with this need. However, it is a necessity to have a quick release mechanism installed in any window that has window bars in case emergency egress becomes necessary.