This is a common problem with people installing their own aftermarket radios, and it is a simple fix. There are normally 2 power wires going to the radio. One of them is only powered with the ignition on, and the other is always powered to keep the radios memory function operating properly. You must have swapped them somehow.
Besides that, it would have to be a defective radio, but 99 times out of 100 it is the 2 wires being switched. It doesnt matter what brand or style radio it is, they all use the same power setup.
Do you have the installation manual? If so read it over and see what color wires are for ignition power and "always on" power. Normally they would be yellow, orange, or red.
After finding which 2 wires they are, use a test light or voltmeter to see which one is showing 12v with the ignition off and wire it correctly.