All our friends have equally terrible stories. Maybe you just got lucky or haven't owned a home yet?
Saying that out loud, yes, inspection is a skill like any other, and it's a bit simplistic for me to say that "obviously that house is good/bad," at least as an intervention I'm recommending to randos I don't know.
But...if I've just gotten lucky then I should buy some lottery tickets. I'm never wrong when I point out the places a house is going to fail or the places where it's going to succeed. My background is a bit off the beaten path (lots of construction, handyman activities, bank demolitions, out-at-sea yacht repair/captaining/maintenance/emergences, electrical installations, whatever -- at least until I finally settled down into a more stable tech career); maybe that helps, or maybe I have some loose wires upstairs. Whatever the case, I don't think it's hard to avoid a bad house if you take the time and care to properly inspect it (and it might take a lot of time, including some disassembly -- big red flag if you can't peek into the internals, and I wouldn't make a multiple hundred thousand dollar investment if you aren't allowed to check on the details).
Home ownership sucks and after selling my previous home I'm so glad to be renting. Just never having to deal with another contractor makes me so happy. :)