DCGAN is initialized with random weights, so a random code plugged to the network would make a completely random picture. Nevertheless, while you might imagine, the network has a lot of parameters that we are able to tweak, and the goal is to locate a setting of those parameters which makes samples generated from random codes look like the teaching