This is because everything inside SVG document lives in an imaginary infinite world where dimensions and distances are expressed in abstract "user units".
You use "viewBox" attribute on the outermost <svg> element to specify a rectangular fragment of that world for the purpose of rendering. You use "width" and "height" properties to specify the real-world size of that fragment.
Authoring tools might show you dimensions of SVG objects such as rectangles or paths in real-world units computed from "viewBox", "width" and "height" of the outermost SVG element, but under the hood the size of those objects should be stored in user units.