Short answer: math. 2D cameras have a uniform width and height from min to max draw distance (near and far planes). Perspective cameras (3D) have a non-uniform width and height that changes from min to max draw distance. That 623 is what you'd call a "magic" number in your case. If you were to change the near or far clipping planes on your camera, that value would also need to change.