I agree that Lionel and MTH are making a lot more money on the starter sets and the like, the fixed costs of producing them are a lot less because of the volume. One of the reasons the scale units are so expensive is to make a profit out of them, given the market for scale units is relatively small, they need to sink more of the production costs into each unit, that is basic manufacturing 101. It isn't that they are doing the scale units out of some sense of being nice to scale modelers, I am sure they make a decent profit on those units (if they were losing money on them, they wouldn't build them. Even with Dick Kuhn, who obviously was an enthusiast as well as a businessman, I don't think he made things simply because he loved them).
In terms of quality, we have had a lot of threads on it, and one thing to keep in mind is even with all the inspections in the world, problems slip through. If inspections are being done in manufacturing, inspections are usually done after it is built, and by then it won't pick up a lot of issues, can't. Something like the wrong numbers on the sides of the engine seem glaring, but it also depends on someone who quite honestly is looking for it, especially if the detail is relatively small for example, they may be looking more at the paint, that there is no bleed or bubbles, than that. They might run basic tests on an engine working, but it is likely to be specified areas, and sometimes with that approach glaring errors are missed.
If inspected here, it is very, very easy to miss things, likely they have a big shipment come in, want to get it shipped out, so the people doing it aren't exactly going to have the luxury of time. Given this process, the only way to assure the kind of quality we are talking about, would require going to a lean production/quality process that basically devalues inspections, but given the way trains and a lot of other things are manufactured, that isn't likely, no basis for it. The train manufacturers assume, rightly, that people might not be happy, but figure they can handle that fixing stuff under warranty.
Warranty repairs are always problematic, they are a pain to the person owning it since they have to take it in/given that to be blunt they have a captive audience, in scale there are basically 3 main manufacturers (Lionel, MTH, Atlas, with 3rd rail as a smaller, more boutique example), and given units are often unique, if you want that engine painted for that unique road name, you have no choice for the most part. So if you have mismatched numbers, missing parts, bad paint, etc, you can hope the manufacturer will/make good, or accept that you have a unit that is going to be flawed going down the road. You would hope something that is not cheap would have quality built into it, but that isn't always true, in the car world some of the most expensive luxury cars have had horrible quality compared to cheaper ones.