Why are binary numbers sometimes written with one or more leading zeros that don't change the number (quantity) represented?
Leading zeroes in binary usually indicate the bit length of the data type.
For example, the number 110 represented in a 4 bit data type would be 0110.
Even if there is no data type specified, it's sometimes common to pad your binary numbers to the next power of 2. For example, 10111 of size 5 should be padded to 8 $(2^3)$ as 00010111