Most people who buy reliable cars like a Camry or Accord do not have the same experience you did.
It depends on the year. I don't know of any bad years for the Accord, but the Camry had several, including as recently as 2007. Our '95 Camry LE four was a well-engineered, reliable car, but the fuel system developed issues well before 140,000 miles, and took several tries to get fixed. (It also had terribly noisy anti-sway bar bushings.) The Volvo 850 was a good example of trying too hard to redesign everything at once, with the original automatic transmission coming sealed (!) for the first couple of years, prompting early failures, and the cylinder head oil passages being a bit too small for non-synthetic oil. Even the later ones weren't extremely reliable, just rugged. We've owned several of those iconic "run forever" cars, from Volvo 140 and 240 series, through a Civic Si I had for 23 years (the windshield leaked from year three on), to that Camry. I don't miss them now.