somehow the japanese can get the chinese or other non Japanese manufacturers to build good stuff for them.
It's not exactly 'somehow.' There's a lot of 'how' behind it, and it all began with Japanese junk circa 1948-1953. A relatively small contingent of Japanese manufacturing leaders, stung by constant criticism of dismal Japanese quality, glommed on to statistical quality control as espoused by an American, W. Edwards Deming. Out of that and a number of other origins, Kichiro Toyoda began defining an evolutionary schema of manufacturing that got its official name (Toyota Production System) finally in 1992.
Stated simply, it says there is a right way to manufacture things, and a right way to keep production moving from raw material to finished product. Neither way is easy at first, but mastering both makes it easy (relatively) to make good products cheaply. Toyota basically said, make your stuff our way or we won't buy from you... and, if you stop making stuff our way, you're gone.
Interestingly, both ways become easy with practice and the right attitudes. It's akin to a Ted Williams continuously studying what goes into making a hit in baseball.
Also interestingly, Toyota put a lot of effort into showing its workers how their efforts result in greater profit to Toyota... and why greater profit is good for the workers. It's not just in the paycheck... the best benefit a company can give its people is continued employment and for a long time, once you joined Toyota, you had a job for life. That's changed thanks to economic pressures. What hasn't changed is Toyota's investment in training and its support in enabling workers to gain education.
The 'Toyota Production System' (or bits and pieces of it) has a lot of names in industry these days - 'just in time' manufacturing, 'lean manufacturing', 'six sigma manufacturing', 'continuous improvement', 'design for manufacturing', 'agile manufacturing', and others I'm forgetting (I spent 30 years writing about this stuff).