IF the cartridge or valve in installed backwards, you are confusing the valve's brain. When you turn it to "hot" that side is cold but in order to get the set temperature the valve is trying to add hot water. Since your valve seems to have the cold water connected to the hot side, and vice versa, the farther the "hot side" opens to make the temperture hotter, the more cold water you get, so the valve is like a dog chasing its tail. The same thing happens when you go to the cold side. The valve opens the cold further and further as the temperature rises, but it is rising because there is more and more hot water coming in. Reverse the cartridge, if possible, and everything should work properly. If it cannot be reversed, then the manufacturer may make a "reversed" cartridge to handle backwards piping. If neither of these are possible, you will have to repipe the valve properly.