In order to survive, cockroaches must be very opportunistic in regards to their food choices, and will eat just about anything.
They are omnivores, eating both plants and animals and will in fact eat any organic compound including paper, carpet, furniture upholstery, etc.
This means that yes, cockroaches can be cannibalistic also. They will consume other cockroaches if the opportunity arises, and consider one of their own kind nothing more than another food source.
This trait is simply a survival mechanism which allows the cockroach to enjoy a very hardy existence and survive in harsh environments with seemingly little food available, that other insects and animals would not be able to survive in.