Follow my walkthrough on thermostat installs to learn about wiring, Wi-Fi and how you can do this project yourself.
If you swapped the suspect 2-wire non-programmable with the known good 2-wire programmable from the bathroom and it works properly, there is no other conclusion. The 2-wire non-programmable is broken.