Check out this article on matter numbering.
If your matters were recently imported from a previous practice management solution, it is possible there might be glitches in some matter's numbering scheme.
To resolve this:
Open the incorrectly populated matter
Click Matter number override
Input a new numbering scheme