As Tom says, nothing controls which layers and which neurons within a given layer learn which attributes to detect. The reason that they don’t all learn the same thing is precisely because we do “Symmetry Breaking”, by randomly initializing all the weights differently. Of course all this is statistical, so it’s still at least technically possible that two neurons could end up learning the same thing, but the probability of that happening is pretty low. Here’s a thread about Symmetry Breaking.
Speaking of low probability events, it is technically possible that 5 seconds from now, through Brownian Motion, all the molecules in the atmosphere of the room you’re in could be concentrated in one cubic centimeter up in one of the corners of the ceiling and that you would instantly be in a vacuum and your lungs would explode. The Laws of Physics do not prevent that from happening, but should you be worried about it? The probability that it could happen is literally non-zero, but it’s so close to zero that it’s not worth worrying about.