Sonata is good, but if you're looking to keep it long term, Japanese cars are the way to go. There are many, many 10+ year old Accords and Camrys out there, but you can hardly see Sonata from same years.
Sure, Accords and Camrys sold many more, but it's still disproportionately low.
If you're looking to lease, then Sonata is a good value.
to be fair, the year the Koreans really started to compete hard is around 2011-2012 and newer...that's when most of their vehicles were "new" designs (have been redesigned since then, of course)...if you look at their sales volumes too, you'll see a pretty strong sales increase from around that time.
I just quickly googled Kia and Hyundai USA annual sales (most recent data is 2016).
2006
Kia: 294,302
Hyundai: 455,520
Toyota: 2,047,057
2016
Kia: 647,598
Hyundai: 768,057
Toyota: 2,106,132
as you can see, while the volume is stil far off from Toyota, the growth is quite respectable...also, of course you will see a lot more (example) 10 year old Toyotas on the road, they sold 5-8 times as many cars as Kia or Hyundai did...but a 10 year old Toyota is likely a better car than a 10 year old Kia or Hyundai...however, if comparing new cars, they are likely pretty close.
Yes, higher volume sold for Toyota and Honda is a big factor in number of 10 year old cars on the road.
Sure, Hyundai and KIA have been improving over the last decade, but we don't know long term reliability because Korean brands don't have the history of being reliable cars, yet.
Being a Korean, I want them to do well, but when I hear about things they do sometimes, I keep going for Japanese cars.
They treat their domestic customers very differently, and although not technically proven, the build quality and material are said the be different from domestic vs. export vehicles.
One example is their current model Santa Fe had a widespread leak in the hatch, but they refused to cover it under warranty. So they earned a nickname 'Soota Fe'. 'Soo' in Korean means 'water'.