Why would the shower water only get really hot when the cold water is turned on in the tub?

Because someone has connected the hot water line to the cold service. They are reversed. I'm not a plumber, so I don't know if the first answer is correct or not. However, our landlord replaced our shower fixture with one that could be adjusted so that it prevented burns. He was pretty proud of it because it was supposedly an expensive model & it was safer for kids. The plumber that installed it used the default settings, I think. But I was unhappy with it for the longest time because I could never ever ever get a HOT shower out of the thing. And I didn't want to turn the water heater up because that uses more energy & runs up the utility bill. Eventually, I got brave enough to pop the cover off the shower control handle and discovered the little safety lever to adjust the water from cooler to hotter. Everything worked fine after that.