This doesn’t happen. You are definitely approaching that asteroid before the distance says 0m. If this actually happens, you should be able to observe and note/record when the distance suddenly switches to saying 0km from whatever-km as you’re staying still.
As with most objects in space, their center point isn’t actually in their visual center. But all objects function as a sphere or a cube (or a collection of such for complex structures like stations), with their physical “bump” sizes set by the developers (but not something we can actually see/know). The game calculates your distance to the object by subtracting the sphere’s radius from the distance between the center point of the object and your ship’s center point. I genuinely doubt that the calculation happens from the physical edge of the object (i.e. where the texture mesh is located).
So when you meet a big, uneven rock, there might be a lot of empty space that’s actually part of its physical size because its center point won’t necessarily be in the true geometric center location. And likewise, there can be bits of the object that are outside of its physical space, where there will be no collision. This is why you can sometimes fly through sections of large objects as if there’s nothing there.