It's fine that they are high because there is still no chance that you'll run out.
So, why are higher numbers better than low numbers?
You want IDs to be as unique as possible. Not just between each other, but when you see "40089" anywhere in your program, it's nice to have a good hint that it's a resource ID. This can help debugging.
I have seen a similar pattern in databases, where there is no type safety and every object has an ID. So for example if you see an ID of "20032" somewhere, you know already that it's an Employee.ID
, while "22011" is most likely a Department.ID
etc.
Personally I don't understand the point of separating icon resource IDs from menu items. They are all just resource IDs, and this distinction seems pretty arbitrary. Jumping from 100 to 40000 guarantees that you'll never run out of IDs for icons.
Of course this is not a complete answer. Why the specific pattern? Why the specific numbers? I doubt you'll find a real answer to this stuff; it's just how it's implemented.