Short answer: numbers "cannot" start with 0. Entering something with leading zeros is a valid syntax but these will not be saved.
Detailed answer: any input field of type number
(be it HTML or Lightning) will use a numeric JS type to save the data. This will strip the leading zeros.
If you need leading zeros then, what you are saving is not a number but some sort part number or a phone number. You should use a string type.
To do so, use a text input with a pattern that only allows numbers like so:
<lightning:input type="text" label="Numeric value" aura:id="myInput" name="myInput" pattern="[0-9]*"/>
This will display an error message if the user tries to enter non-numeric characters. You can check if the field is valid at any time by calling:
var validity = cmp.find("myInput").get("v.validity");
console.log(validity.valid);
General comment for all involved in this question: do not use ui:inputNumber
(to be deprecated) please use lightning:input
instead.