That is because we initialize each of the neurons at the beginning of training in a random way, so that each one starts the training with a different value. That is called “Symmetry Breaking” and it is critical, precisely because it allows each neuron to learn different things. Here’s a thread about Symmetry Breaking.