The engines are not mass produced. They are hand assembled from parts by people who are harried and pressed by their supervisors. Also, the trains are not considered a hi-tech or sophisticated item, but a toy, and the production of something else will ensue as soon as that run is completed, in about a couple of days or so. The distributor/manufacturer/marketer expects that he'll get returns near 15%, and he has a local repair facility to deal with such problems.
Also, the parts are often tiny, and tolerances are tight. Tiny screws and thin wires have to be pressed into narrow confines so that the engines can be weighted enough to pull well. Human hands will make more mistakes with assembly of that nature.
I am not hoping to sound unsympathetic, just realistic. I have had to send a couple of new engines back for repair, which wasn't particularly thrilling for me. But the engines came back properly done, and I have enjoyed them none the less. In one case, I had to fix a short between the towbar of my new steamer and the metal truck. It took some sleuthing to final figure it out. I had to rap hard on a rivet with the truck removed so that the towbar didn't have so much vertical slop. That tightening of the rivet solved my short problem. I still had to send the tender back to get the decoder replaced.
My hope is that your hobby shop has a replacement for you.
-Crandell