It did - just not in Europe. The Romans usually used numbers for counting things someone had and their number system simply didn't need a zero.
The Arabs on the other hand invented a number system that needed a zero, because the position of a digit within a number determined its value and each position had a certain value to it. A number like 40 simply doesn't have any units to it so the system needed a number for "nothing". Interestingly though, the idea of zero as a number didn't get popular until a lot later. It was only used as a placeholder for "no units" or "no tens" etc. but treating zero as an actual number was still weird to them.
Only with the introduction of debt and owing something the zero and negative numbers really became a thing.