This topic has come up quite a few times over the years on this board. A lot of the discussion around it has mostly been others opinions. I found this neat little graph online (instagram) from the New York Times that compares the two. Now keep in mind one's location will certainly have an effect on which one might make more sense, even in what part of you own country you're in.
There is nothing bad in buying a house or renting it, doing both, your plan and purpose for doing such matters. At times, you may not have the money to get the kind of house you want to buy, in this case, surely, you will not sleep outside or do any magic, you will have to be patient for a while until you are financially stronger enough to buy a house. In some cases, it could be a situation of relocation where you can't immediately settle for the buying of the house, and of course, you will have to rent.
Again, there are some people who have bought or built houses at some disadvantaged location, they do not have a choice, and they might still opt to rent a house for the time being. If they calculate the proximity-caused issues like the convenience of getting to work, resources to be wasted due to and fro daily, and safety, they would surely resort to renting a house in most cases. So, the two are no big deal, as safety, purpose, plan and convenience are key here.