The reason why a cartridge faucet leaks after replacing the cartridge can vary based on your water quality, the age of the faucet, and the type of cartridge.
First, the leak may not have been caused by a faulty cartridge. Water is full of calcium and other minerals that make it highly corrosive. Over time, the water can eat away at imperfections in the brass body of the faucet. These imperfections often occur during the casting process. Small bumps and soft spots in the brass can wear away. This allows rivulets to form in the brass. You may not even realize that they are there since they can blend in with the coatings on the brass created by the water. When fixing a cartridge faucet, it is a good idea to buff the inside of the cylinder. This will leave a dark line that will allow you to see the rivulets with a flashlight.
Your faucet may contain a ceramic, brass, or rubber seat that is meant to form a seal at the bottom of the cartridge opening. The seat can become damaged with use so that it no longer fits correctly into the hole in the cartridge, which allows water to leak. The O-ring may also become cracked and cause a leak. The best rule of thumb is to replace all of the inside parts of a faucet at the same time so that you get a good seal.