It is frustrating. Amazon's prices can be all over the place...personally I'd be weary buying any mechanical items such as engines and operating accessories from them. Rolling stock and figures, may be a safer bet. I'll second that finding a reputable dealer that doesn't get miffed when you return a defective train is key.
Years ago one of my family's young ones opened up a brand new Lionel starter set, a gift from their grandfather at Christmas, only to find the engine defective. I messed around with it for a while, took it apart, and eventually got it to run, albeit in reverse only. I don't know what percentage of starter sets have major or minor QC issues, however I cringe on how many toy trains must get returned or simply thrown-out, and that youngster and his/her parents never consider electric toy trains again.